views:

138

answers:

1

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;

+2  A: 
// Destroy the Help button
CButton *btnHelp;

btnHelp = reinterpret_cast<CButton *>(GetDlgItem(IDHELP));
btnHelp->DestroyWindow();
Priyank Bolia
tanx 4 ur reply...its not a normal button that u can delete using the above coding...I am using CPropertySheet -its an object which holds your Property Page...it will not work..some other way
kiddo
I know you are using the CPropertySheet, and a button is a button. You Can try ((CWnd*)GetDlgItem(IDHELP))->ShowWindow(SW_HIDE); or can looks at the various samples on internet: http://www.functionx.com/visualc/articles/propsheetbtn.htm
Priyank Bolia