How to implement Help button in a property page?
-
Hello, everyone, I'd like to know how to handle the help button in property page. In my property page, there are OK, Cancel, Apply and Help button. For OK, Cancel and Apply button, it is easy to handle. I just go to ClassWizard->Message Maps to add function OnOK, OnCancel and OnApply, and then put code into the functions. But I don't know how to handle the help button. What I can only think of is to get the rect of IDHELP button and then handle the mouse left click message. But I think there should be more straightforward way to handle it. If you know how to handle it, please drop me a couple lines. Thanks a lot in advance. Bin
-
Hello, everyone, I'd like to know how to handle the help button in property page. In my property page, there are OK, Cancel, Apply and Help button. For OK, Cancel and Apply button, it is easy to handle. I just go to ClassWizard->Message Maps to add function OnOK, OnCancel and OnApply, and then put code into the functions. But I don't know how to handle the help button. What I can only think of is to get the rect of IDHELP button and then handle the mouse left click message. But I think there should be more straightforward way to handle it. If you know how to handle it, please drop me a couple lines. Thanks a lot in advance. Bin
Add the following statement to the sheet's message map:
ON_COMMAND(ID_HELP, OnHelp) // the function called can differ depending on your needs
In the function that creates the sheet object, add:
sheet.m_psh.dwFlags |= PSH_HASHELP;
page1.m_psp.dwFlags |= PSP_HASHELP;
page2.m_psp.dwFlags |= PSP_HASHELP;
...
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
Add the following statement to the sheet's message map:
ON_COMMAND(ID_HELP, OnHelp) // the function called can differ depending on your needs
In the function that creates the sheet object, add:
sheet.m_psh.dwFlags |= PSH_HASHELP;
page1.m_psp.dwFlags |= PSP_HASHELP;
page2.m_psp.dwFlags |= PSP_HASHELP;
...
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)