I am using CPropertySheet class for my design in MFC application,normally in CPropertySheet there would be 4 default buttons..I want to hide/delete the HELP button..I tried the following..but its not working/nither responding..I had this written in my CPropertyPage class is there any other way...
m_psh.dwFlags &= ~PSH_HASHELP;
The property pages also have a HASHELP
flag that needs to be cleared. The following code in the constructor of the property sheet should work:
// After the last AddPage() call:
m_psh.dwFlags &= ~PSH_HASHELP;
for(int i=0; i<GetPageCount(); ++i)
GetPage(i)->m_psp.dwFlags &= ~PSP_HASHELP;
Alternatively, one can also modify the m_psp
flag for each individual page before calling AddPage()
:
m_psh.dwFlags &= ~PSH_HASHELP;
page1.m_psp.dwFlags &= ~PSP_HASHELP;
AddPage(&page1);
// ...
http://msdn.microsoft.com/de-de/library/37k4h0bh(v=vs.80).aspx
You have to remove the flag from the sheet and all pages...
mySheet.m_psh.dwFlags &= ~PSH_HASHELP;
page1.m_psp.dwFlags &= ~PSP_HASHELP;
page2.m_psp.dwFlags &= ~PSP_HASHELP;
...
Take care of the difference: m_psh vs. m_psp and PSH_HASHELP vs. PSP_HASHELP
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With