启动帮助文件的学习demo

来源:互联网 发布:javascript delay函数 编辑:程序博客网 时间:2024/06/05 08:39


建立一个对话框工程,

在C**APP 类中添加

BOOL Cmfc_dlg_testApp::PreTranslateMessage(MSG* pMsg){// TODO: Add your specialized code here and/or call the base classif (WM_KEYDOWN == pMsg->message && VK_F1 == pMsg->wParam){HWND hwnd = ::HtmlHelp(NULL,TEXT("F:\\演示学习的工程\\mfc_dlg_test\\mfc_dlg_test\\ADO210.chm"),HH_DISPLAY_TOPIC,NULL);//return bRet;}return CWinAppEx::PreTranslateMessage(pMsg);}

在 C**Dlg 改写(这里不改写的话,会弹出启动帮助失败的提示。目的在于禁止调用父类 CDialog::WinHelp(dwData, nCmd);)

void Cmfc_dlg_testDlg::WinHelp(DWORD dwData, UINT nCmd){// TODO: Add your specialized code here and/or call the base class//CDialog::WinHelp(dwData, nCmd);}


0 0
原创粉丝点击