点击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
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
解决方案 »
- 问君能有几多愁,as a boy without a girl 。。。。。
- 新年新气象,星期一准备去谈第一笔单,怎么报价?
- 各位大侠快帮忙,我安装了Windows Server 2003简体中文版,但是我原来在win98下常用的各种Norton产品(Norton SystemWorks 2003)都装不
- 放分寻求帮助!有没有最近参加过金山公司校园招聘的人?help!!!!
- 关于ADDNEW的使用问题...很容易,但是我不会:(
- 谁能帮我调试一下这个程序(调试好了分数可增加)
- 关于双字节和单字节字符串的处理
- ISO C -------文件名不能超过6个字母(不含扩展名)吗?
- 如何将int型的数据转换成CString型的数据
- 一个关于编辑框的简单问题.
- 请问谁有PNG文件格式的的资料?
- 求源码,如何实现类似于winampPlay窗口中波形随机上下震动的效果?
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的方法了。谁能指点我,是怎么调用的?
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.