Context help button behaviour on CPropertySheet

2019-07-14 05:20发布

The latest version of Microsoft Office uses property sheets that have the context help [?] button next to the close button:

enter image description here

When the context button is clicked it invokes the application's help rather than switching to 'context mode', by which I mean the arrow cursor with a question mark, i.e. there is no context help despite this being the context help button (or appears to be).

I'm trying to recreate this behaviour in an property sheet derived from the MFC CPropertySheet. So far I've had no luck. Ideally I'd like a click on this button to act in the same way as pressing F1, e.g. call directly on to the OnHelpInfo function.

Can anyone tell me how this might be achieved?

标签: mfc
1条回答
迷人小祖宗
2楼-- · 2019-07-14 05:54

As per my comment, adding ON_WM_SYSCOMMAND to the message map and then processing SC_CONTEXTHELP in OnSysCommand did the trick.

查看更多
登录 后发表回答