Well, in short, im calling this function CMFCPropertySheet::AddPage()5 time with 5 CPropertyPage !
Now, all the 5 pages are added but not created as MSDN say:
AddPage adds the CPropertyPage object to the CPropertySheet object's list of pages but does not actually create the window for the page. The framework postpones creation of the window for the page until the user selects that page.
My Problem now is that My PropertySheet need to update an EditBox in one of those page, but that page isn't created yet, so also the EditBox !
I know i cannot update that EditBox which isnt created yet.
But since i am loading configs and i will need to update many controls to their config stats !!!
and also its not an editboc but a listview...
Creating the page (window) manually would be great !
It creates the page when you activate them by selecting that tab. If the tab isn't selected, the page isn't visible, so updating the edit control doesn't make sense. You could put your code in OnInitDialog or OnActivate for the appropriate page.
Guys, if the user wont click on the tab for the first time , that tab wont be created !!!
So i want to create it manually and not waiting for the user to do it !
@GCDEF: with your way, samething happen, the control is still nto created since its part of the page !
@VictorN: of course i understand it, just you guys keep sayign samethings again and again !
The controls in that page are still NOT CREATED !
So im searchign an alternative way TO CREATE THEM and not waiting the user to click on the page !
All SetActivePage calls have returned "true" !
PS2: is there a way to create another CMFCPropertySheet withotu the dialog frame and locate it in another dialog ? (a smal size PropertySheet)
Thanks
My way doesn't need the controls. Just use the variables that are associated with the controls that store the data. Set up members using the DDX mechanism to exchange data with the controls and use them instead of the controls directly.
Like GCDEF says, why don't you seperate the UI from the data ? All you need at initialization time is to make sure that the data in all the C++ objects representing the propertypages ( CPropertyPage objects ) properly populated. When the pages do get created , if ever, they simply show the data in the corresponding C++ object in the windows.
Bookmarks