![]() |
Buttons missing in modeless CXTResizePropertySheet |
Post Reply
|
| Author | ||||||||
luinho
Newbie
Joined: 20 June 2008 Location: United Kingdom Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Topic: Buttons missing in modeless CXTResizePropertySheetPosted: 20 June 2008 at 11:23am |
|||||||
|
It looks like this is a bug in the MFC CPropertySheet class itself that does not create the buttons when the propertysheet is modeless (I don't exactly know why someone would not need the buttons just because the dialog is modeless...
), but I would expect the derived CXTResizePropertySheet to be implemented properly and fix this "bug".
Anyway, is there an easy way to create a resizeable modeless property sheet with the OK, CANCEL and HELP buttons using CXTResizePropertySheet ?
|
||||||||
![]() |
||||||||
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 June 2008 at 1:38pm |
|||||||
|
Use Google + "How To Create a Modeless CPropertySheet with Standard Buttons"
|
||||||||
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||||||||
![]() |
||||||||
luinho
Newbie
Joined: 20 June 2008 Location: United Kingdom Status: Offline Points: 2 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 June 2008 at 5:47am |
|||||||
|
Many thanks Oleg.
I got this from the MSDN article
Q146916 - How To Create a Modeless CPropertySheet with Standard Buttons
For a modeless CPropertySheet, the Microsoft Foundation Classes (MFC) resize the sheet and hide the standard buttons in the CPropertySheet::OnInitDialog member function. To prevent MFC from doing this, perform the following steps:
BOOL CMyPropertySheetClass::OnInitDialog() { BOOL bResult; if(this->m_bModal) { bResult = CPropertySheet::OnInitDialog(); } else { m_bModeless = FALSE; m_nFlags |= WF_CONTINUEMODAL; bResult = CPropertySheet::OnInitDialog(); m_bModeless = TRUE; m_nFlags &= ~WF_CONTINUEMODAL; } return bResult; } // We don't want to display the apply button this->m_psh.dwFlags |= PSH_NOAPPLYNOW; |
||||||||
![]() |
||||||||
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |