Displaying CPropertySheet in a Dialog
-
Hi all, I'm kinda new to MFC and come from the world of Java so please bear with me. I have a dialog on which (amongst other things) I want to display a CPropertySheet (along with CPropertyPages ofcourse). Being the newbie that I am, I did the following: In the OnInit() method of my dialog I put down the following code:
//m_ps is a member variable of type CPropertySheet m_ps.Construct("Test Property Sheet", this, 0); m_ps.SetWindowPos(this, 50,50,100,100, 0); m_ps.ShowWindow(SW_SHOW);
This doesn't work (and also causes an assert). Can anyone help me out please? -
Hi all, I'm kinda new to MFC and come from the world of Java so please bear with me. I have a dialog on which (amongst other things) I want to display a CPropertySheet (along with CPropertyPages ofcourse). Being the newbie that I am, I did the following: In the OnInit() method of my dialog I put down the following code:
//m_ps is a member variable of type CPropertySheet m_ps.Construct("Test Property Sheet", this, 0); m_ps.SetWindowPos(this, 50,50,100,100, 0); m_ps.ShowWindow(SW_SHOW);
This doesn't work (and also causes an assert). Can anyone help me out please? -
-
But I need to add a tree control outside the property sheet and have nodes on the tree add/remove pages from the property sheet accordingly. I think this can't be done with the CPropertySheet as a main window. Will look at the examples tho. Thanks :-)
Gotcha. It always helps to state all the necessary requirements so that unnecessary suggestions can be avoided.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
-
Hi all, I'm kinda new to MFC and come from the world of Java so please bear with me. I have a dialog on which (amongst other things) I want to display a CPropertySheet (along with CPropertyPages ofcourse). Being the newbie that I am, I did the following: In the OnInit() method of my dialog I put down the following code:
//m_ps is a member variable of type CPropertySheet m_ps.Construct("Test Property Sheet", this, 0); m_ps.SetWindowPos(this, 50,50,100,100, 0); m_ps.ShowWindow(SW_SHOW);
This doesn't work (and also causes an assert). Can anyone help me out please?You can create the property sheet as a child of your main dialog. See this[^] MSDN link for instructions. Alternatively, you could use a CTabCtrl and a bunch of child windows (a la "property pages"). See this[^] thread for info. Personally, I prefer the latter. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com