本文整理汇总了C++中OnHelp函数的典型用法代码示例。如果您正苦于以下问题:C++ OnHelp函数的具体用法?C++ OnHelp怎么用?C++ OnHelp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OnHelp函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
BOOL
CTagDlg::OnCommand(int id, HWND hwndCtl, UINT notifyCode)
{
switch(id)
{
case IDOK: OnOK();return TRUE;break;
case IDCANCEL: OnCancel();return TRUE;break;
case ID_HELP: OnHelp(); return TRUE; break;
case IDC_VERIFY_HTML: OnVerifyHtml(); return TRUE; break;
default: return FALSE;
}
return FALSE;
}
示例2: switch
/**
* @brief Handle dialog messages.
* @param [in] hDlg Handle to the dialog.
* @param [in] iMsg The message.
* @param [in] wParam The command in the message.
* @param [in] lParam The optional parameter for the command.
* @return TRUE if the message was handled, FALSE otherwise.
*/
INT_PTR CopyHexdumpDlg::DlgProc(HWindow *pDlg, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
switch (iMsg)
{
case WM_INITDIALOG:
return OnInitDialog(pDlg);
case WM_COMMAND:
return OnCommand(pDlg, wParam, lParam);
case WM_HELP:
OnHelp(pDlg);
break;
}
return FALSE;
}
示例3: UNREFERENCED_PARAMETER
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)
{
UNREFERENCED_PARAMETER(lParam);
switch(LOWORD(wParam))
{
case IDM_FILE_EXIT: return OnFileExit();
case IDM_VIEW_TEXT: return OnViewText();
case IDM_VIEW_LIST: return OnViewList();
case IDW_VIEW_STATUSBAR: return OnViewStatusBar();
case IDW_VIEW_TOOLBAR: return OnViewToolBar();
case IDM_HELP_ABOUT: return OnHelp();
}
return FALSE;
}
示例4: switch
STDMETHODIMP CMainFrame::Execute(UINT32 nCmdID, UI_EXECUTIONVERB verb, const PROPERTYKEY* key, const PROPVARIANT* ppropvarValue, IUISimplePropertySet* pCmdExProp)
{
// This function is called when a ribbon button is pressed.
// Refer to IUICommandHandler::Execute in the Windows 7 SDK documentation
if (UI_EXECUTIONVERB_EXECUTE == verb)
{
switch(nCmdID)
{
case IDC_CMD_NEW: OnFileNew(); break;
case IDC_CMD_OPEN: OnFileOpen(); break;
case IDC_CMD_SAVE: OnFileSave(); break;
case IDC_CMD_SAVE_AS: OnFileSaveAs(); break;
case IDC_CMD_PRINT: OnFilePrint(); break;
case IDC_CMD_COPY: TRACE("Copy\n"); break;
case IDC_CMD_CUT: TRACE("Cut\n"); break;
case IDC_CMD_PASTE: TRACE("Paste\n"); break;
case IDC_CMD_ABOUT: OnHelp(); break;
case IDC_CMD_EXIT: OnFileExit(); break;
case IDC_RICHFONT: TRACE("Font dialog\n"); break;
case IDC_RIBBONHELP: OnHelp(); break;
case IDC_MRULIST: OnMRUList(key, ppropvarValue); break;
case IDC_PEN_COLOR: OnPenColor(ppropvarValue, pCmdExProp); break;
case IDC_CUSTOMIZE_QAT: TRACE("Customize Quick Access ToolBar\n"); break;
default:
{
CString str;
str.Format(_T("Unknown Button %d\n"),nCmdID);
TRACE(str);
}
break;
}
}
return S_OK;
}
示例5: switch
/**
* @brief Handle dialog messages.
* @param [in] hDlg Handle to the dialog.
* @param [in] iMsg The message.
* @param [in] wParam The command in the message.
* @param [in] lParam The optional parameter for the command.
* @return TRUE if the message was handled, FALSE otherwise.
*/
INT_PTR MoveCopyDlg::DlgProc(HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
switch (iMsg)
{
case WM_INITDIALOG:
return OnInitDialog(hDlg);
case WM_COMMAND:
return OnCommand(hDlg, wParam, lParam);
case WM_HELP:
OnHelp(hDlg);
break;
}
return FALSE;
}
示例6: DlgProc
/*-------------------------------------------
dialog procedure
---------------------------------------------*/
INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message,
WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
OnInitDialog(hDlg);
return TRUE;
case WM_COMMAND:
{
WORD id; // , code;
id = LOWORD(wParam); // code = HIWORD(wParam);
switch(id)
{
case IDC_APPLY:
OnApply(hDlg);
break;
case IDC_MYHELP:
OnHelp(hDlg);
break;
case IDOK:
OnOK(hDlg);
case IDCANCEL:
if(g_hfontDialog)
DeleteObject(g_hfontDialog);
SetMyRegLong(NULL, "LastTreeItem", m_lastTreeItem);
EndDialog(hDlg, id);
break;
}
return TRUE;
}
case WM_NOTIFY:
{
NM_TREEVIEW* pNMTV = (NM_TREEVIEW *)lParam;
if(pNMTV->hdr.code == TVN_SELCHANGED)
{
OnTVChanged(hDlg, (int)pNMTV->itemNew.lParam);
return TRUE;
}
break;
}
case PSM_CHANGED:
EnableDlgItem(hDlg, IDC_APPLY, TRUE);
return TRUE;
}
return FALSE;
}
示例7: assert
bool
WndProperty::on_mouse_down(int x, int y)
{
POINT Pos;
if (mDialogStyle) {
if (!edit.is_read_only()) {
// when they click on the label
SingleWindow *root = (SingleWindow *)get_root_owner();
/* if this asserton fails, then there no valid root window could
be found - maybe it didn't register its wndproc? */
assert(root != NULL);
dlgComboPicker(*root, this);
} else {
OnHelp(); // this would display xml file help on a read-only wndproperty if it exists
}
} else {
if (!edit.has_focus()) {
if (!edit.is_read_only())
edit.set_focus();
return true;
}
Pos.x = x;
Pos.y = y;
//POINTSTOPOINT(Pos, MAKEPOINTS(lParam));
mDownDown = (PtInRect(&mHitRectDown, Pos) != 0);
if (mDownDown) {
DecValue();
invalidate(mHitRectDown);
}
mUpDown = (PtInRect(&mHitRectUp, Pos) != 0);
if (mUpDown) {
IncValue();
invalidate(mHitRectUp);
}
set_capture();
}
return true;
}
示例8: UNREFERENCED_PARAMETER
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)
{
// OnCommand responds to menu and and toolbar input
UNREFERENCED_PARAMETER(lParam);
switch (LOWORD(wParam)) {
case IDM_FILE_OPEN:
// Refer to the tutorial for an example of OnFileOpen
OnFileOpen();
return TRUE;
case IDM_FILE_SAVE:
// Refer to the tutorial for an example of OnFileSave
OnFileSave();
return TRUE;
case IDM_FILE_SAVEAS:
// Refer to the tutorial for an example of OnFileSaveAs
OnFileSave();
return TRUE;
case IDM_FILE_PRINT:
OnFilePrint();
return TRUE;
case IDM_FILE_EXIT:
// End the application
::PostMessage(m_hWnd, WM_CLOSE, 0, 0);
return TRUE;
case IDW_VIEW_STATUSBAR:
OnViewStatusBar();
return TRUE;
case IDW_VIEW_TOOLBAR:
OnViewToolBar();
return TRUE;
case IDM_HELP_ABOUT:
// Display the help dialog
OnHelp();
return TRUE;
}
return FALSE;
}
示例9: switch
// unfortunately, under GTK we won't get the original wxKeyEvent
// to reset m_metaDown
void frmMain::OnTreeKeyDown(wxTreeEvent& event)
{
switch (event.GetKeyCode())
{
case WXK_F1:
OnHelp(event);
break;
case WXK_F5:
Refresh(currentObject);
break;
case WXK_DELETE:
OnDelete(event);
break;
default:
event.Skip();
break;
}
}
示例10: switch
bool CDialog::OnButtonClicked(int buttonID, HWND buttonHWND)
{
switch(buttonID)
{
case IDOK:
OnOK();
break;
case IDCANCEL:
OnCancel();
break;
case IDHELP:
OnHelp();
break;
default:
return false;
}
return true;
}
示例11: OnHelp
// Hellup!
afx_msg LRESULT CDynDialogEx::OnHelpMsg(WPARAM wParam, LPARAM lParam)
{
//lParam <<-- Contains: (LPHELPINFO)lParam
// >> typedef struct tagHELPINFO {
// UINT cbSize;
// int iContextType
// int iCtrlId;
// HANDLE hItemHandle;
// DWORD dwContextId;
// POINT MousePos;
// } HELPINFO, FAR *LPHELPINFO;
//
// User pressed F1 in dialog, call the OnHelp() function, this can be overridden...
//
OnHelp();
return TRUE;
}
示例12: OnHelp
void
WndProperty::BeginEditing()
{
if (edit.is_read_only()) {
/* this would display xml file help on a read-only wndproperty if
it exists */
OnHelp();
} else if (mDialogStyle) {
SingleWindow *root = (SingleWindow *)get_root_owner();
/* if this asserton fails, then there no valid root window could
be found - maybe it didn't register its wndproc? */
assert(root != NULL);
dlgComboPicker(*root, this);
} else {
edit.set_focus();
}
}
示例13: switch
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)
{
// Process the messages from the Menu and Tool Bar
switch (LOWORD(wParam))
{
case IDM_FILE_NEW:
m_View.ClearPoints();
m_PathName = _T("");
return TRUE;
case IDM_FILE_OPEN:
OnFileOpen();
return TRUE;
case IDM_FILE_SAVE:
OnFileSave();
return TRUE;
case IDM_FILE_SAVEAS:
OnFileSaveAs();
return TRUE;
case IDM_FILE_PRINT:
::MessageBox(NULL, _T("File Print Implemented Later"), _T("Menu"), MB_OK);
return TRUE;
case IDM_PEN_RED:
m_View.SetPen(RGB(255,0,0));
return TRUE;
case IDM_PEN_BLUE:
m_View.SetPen(RGB(0,0,255));
return TRUE;
case IDM_PEN_GREEN:
m_View.SetPen(RGB(0,196,0));
return TRUE;
case IDM_PEN_BLACK:
m_View.SetPen(RGB(0,0,0));
return TRUE;
case IDM_HELP_ABOUT:
OnHelp();
return TRUE;
case IDM_FILE_EXIT:
::PostMessage(m_hWnd, WM_CLOSE, 0, 0);
return TRUE;
}
return FALSE;
}
示例14: UNREFERENCED_PARAMETER
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)
{
// OnCommand responds to menu and and toolbar input
UNREFERENCED_PARAMETER(lParam);
switch(LOWORD(wParam))
{
case IDM_FILE_EXIT: OnFileExit(); return TRUE;
case IDM_MODELESS: OnModeless(); return TRUE;
case IDM_MODAL: OnModal(); return TRUE;
case IDM_WIZARD: OnWizard(); return TRUE;
case IDW_VIEW_STATUSBAR: OnViewStatusBar(); return TRUE;
case IDW_VIEW_TOOLBAR: OnViewToolBar(); return TRUE;
case IDM_HELP_ABOUT: OnHelp(); return TRUE;
}
return FALSE;
}
示例15: UNREFERENCED_PARAMETER
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)
{
// OnCommand responds to menu and and toolbar input
UNREFERENCED_PARAMETER(lParam);
switch(LOWORD(wParam))
{
case IDM_FILE_OPEN: return OnFileOpen();
case IDM_FILE_SAVE: return OnFileSave();
case IDM_FILE_SAVEAS: return OnFileSave();
case IDM_FILE_PRINT: return OnFilePrint();
case IDM_FILE_EXIT: return OnFileExit();
case IDW_VIEW_STATUSBAR: return OnViewStatusBar();
case IDW_VIEW_TOOLBAR: return OnViewToolBar();
case IDM_HELP_ABOUT: return OnHelp();
}
return FALSE;
}