This works: CSettingsSheet::CSettingsSheet(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage) :CPropertySheet(nIDCaption, pParentWnd, iSelectPage) { AddPage( &m_pageGeneral ); AddPage( &m_pageRegions ); AddPage( &m_pageMarkers ); AddPage( &m_pageReport ); m_psh.dwFlags |= PSH_NOAPPLYNOW;
// No help button m_psh.dwFlags &= ~PSH_HASHELP; m_pageGeneral.m_psp.dwFlags &= ~PSP_HASHELP; m_pageRegions.m_psp.dwFlags &= ~PSP_HASHELP; m_pageMarkers.m_psp.dwFlags &= ~PSP_HASHELP; m_pageReport.m_psp.dwFlags &= ~PSP_HASHELP; } CSettingsSheet::CSettingsSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage) :CPropertySheet(pszCaption, pParentWnd, iSelectPage) { AddPage( &m_pageGeneral ); AddPage( &m_pageRegions ); AddPage( &m_pageMarkers ); AddPage( &m_pageReport ); m_psh.dwFlags |= PSH_NOAPPLYNOW; // No help button m_psh.dwFlags &= ~PSH_HASHELP; m_pageGeneral.m_psp.dwFlags &= ~PSP_HASHELP; m_pageRegions.m_psp.dwFlags &= ~PSP_HASHELP; m_pageMarkers.m_psp.dwFlags &= ~PSP_HASHELP; m_pageReport.m_psp.dwFlags &= ~PSP_HASHELP; } It is not enough to just do it to the sheet. The pages must be set correctly too. Andrew > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Truckle, Andrew J > Sent: 12 April 2005 10:14 > To: 'msvc@beginthread.com' > Subject: RE: [msvc] Problem with CPropertySheet derived class > > > http://msdn.microsoft.com/library/default.asp?url=/library/en- > us/vccore/html > /_core_help.3a_.cpropertysheet_and_cpropertypage.asp > > I have to apply it to the pages too. Not just the sheet. Trying now.. > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Paul Grenyer > > Sent: 12 April 2005 10:13 > > To: msvc@beginthread.com > > Subject: Re: [msvc] Problem with CPropertySheet derived class > > > > > > Hi > > > > > I added code as stated in MSDN to deactivate the help button. But > > > when I run the program, it still shows up and is clickable.. > > > > ..and the code is? It's a while since I've done this, but > > IIRC buttons are funny things and have to be redrawn after > > being deactivated. IIRC there's an > > Invalidate() member function you can call. > > > > Regards > > Paul > > > > Paul Grenyer > > email: [EMAIL PROTECTED] > > web: http://www.paulgrenyer.co.uk > > Aeryn: http://www.paulgrenyer.dyndns.org/aeryn/ > > Elephant: http://www.paulgrenyer.dyndns.org/elephant/ > > > > Aeryn 2 is now ready: http://www.paulgrenyer.dyndns.org/aeryn/ > > > > > > _______________________________________________ > > msvc mailing list > > msvc@beginthread.com > > See > > http://beginthread.com/mailman/listinfo/msvc_beginthread.com > > for subscription changes, and list archive. > > > > > > This message has been scanned for viruses by MailControl - > > (see http://bluepages.wsatkins.co.uk/?4318150) > > > > This email and any attached files are confidential and > copyright protected. > If you are not the addressee, any dissemination of this > communication is > strictly prohibited. Unless otherwise expressly agreed in > writing, nothing > stated in this communication shall be legally binding. > > _______________________________________________ > msvc mailing list > msvc@beginthread.com > See > http://beginthread.com/mailman/listinfo/msvc_beginthread.com > for subscription changes, and list archive. > This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding. _______________________________________________ msvc mailing list msvc@beginthread.com See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.