点击PropertySheet中的帮助按钮时,是怎么调用上下文帮助文档的?不是通过WinHelp()调用的。请对消息传递有研究的高手帮忙!   我对以下程序单步跟踪时,点击PropertySheet中的“帮助”按钮时,进入下面函数(这时nID =9),然后进入MFC的CPropertySheet::OnCmdMsg()(退出MFC后nID =57670);再执行下面函数,然后进入MFC;再执行下面函数,然后进入MFC; 一共执行3次后才调用帮助文档。
BOOL CTndSheet::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo) 
{
if (nID == IDOK)
{
 UpdateTestCaseInfo();
          // 通知主窗口文档内容已经变更,关闭程序时需要保存
          ((CMainFrame*)AfxGetMainWnd())->GetActiveDocument()->SetModifiedFlag(TRUE);
}

return CPropertySheet::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}  能不能告诉我这是怎么把帮助按钮和帮助文档联系起来的?调用机制是什么??
大家可以参照:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/propsheet/propsheet.asp

解决方案 »

  1.   

    我是楼主!
      taianmonkey给我的回答是:
       Property sheets can display two Help buttons: a property sheet Help button that is displayed at the bottom of the frame, next to the OK/Cancel/Apply buttons, and a standard caption bar button that provides context-sensitive Help.
      The property sheet Help button is optional, and can be enabled on a page by page basis. To display the property sheet Help button for one or more pages:
    For each page that will display a Help button, set the PSP_HASHELP flag in the dwFlags member of the page's PROPSHEETPAGE structure.
       When the user clicks the Help button, the active page receives a PSN_HELP notification message. The page must respond by displaying Help information, typically by calling the WinHelp function.  我的程序应该不是常规的调用WinHelp的方法了。谁能指点我,是怎么调用的?
      

  2.   

    你可以看看这几个CWnd的成员函数:Help Command Handlers and FunctionsHtmlHelp Called to initiate the HTMLHelp application. 
    OnHelpFinder Handles the ID_HELP_FINDER and ID_DEFAULT_HELP commands. 
    OnHelpIndex Handles the ID_HELP_INDEX command and provides a default Help topic. 
    OnHelpUsing Handles the ID_HELP_USING command. 
    OnHelp Handles F1 Help within the application (using the current context). 
    WinHelp Called to initiate the WinHelp application. 
      

  3.   

    http://www.codeproject.com/property/EmbededPSContextHelp.asp