According to MSDN:
Help in CPropertySheet is supported by the F1 key and the Help button only. The Help button appears in the application framework by default. No intervention by the user is necessary. When the user adds the help information for each of the pages inside the property sheet, the help mechanism automatically displays the help for that page when the Help button is clicked.
I assume the same to be true for CMFCPropertySheet
. So I first started to try handling the WM_HELPINFO
handler:
void COtherSettingsEmailInfoPage::HtmlHelp(DWORD_PTR dwData, UINT nCmd)
{
HtmlHelp((DWORD_PTR)_T("HelpOptionsEmail.html"), HH_DISPLAY_TOPIC);
//CMFCPropertyPage::HtmlHelp(dwData, nCmd);
}
Didn't work. Then I added a IDHELP
button click handler:
void COtherSettingsEmailInfoPage::OnHelp()
{
HtmlHelp((DWORD_PTR)_T("HelpOptionsEmail.html"), HH_DISPLAY_TOPIC);
}
Didn't work.
So how am I supposed to show the right help topic when the user presses the Help button on the sheet? Confused.
Update
I have tried this in both the sheet and the page - doesn't work:
BOOL COtherSettingsEmailInfoPage::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{
LPPSHNOTIFY lppsn = (LPPSHNOTIFY)lParam;
if (lppsn->hdr.code == PSN_HELP)
{
AfxMessageBox(_T("Boo2"));
}
return CMFCPropertyPage::OnNotify(wParam, lParam, pResult);
}