Click to See Complete Forum and Search --> : CPropertyPage and activating pages


-=SKULK=-
June 11th, 1999, 09:04 AM
Hi
I have a PropertySheet with some pages. The user does not have to select all the pages to fill all controls (default values). But if a page was not selected, the dialog is not created and the member variables are not filled. Is there any possibility to do that except making all pages active in OnInitDialog() using SetActivePage(...) and then selecting the previous active page ?

thanks for help


--
-=SKULK=-

ChrisD
June 11th, 1999, 09:55 AM
Just before you add each page to the propertySheet do the following

CPropterySheet ps;
MyPropPage pp;
pp.m_psp |= PSP_PREMATURE; // Tells the property sheet to create this page prior to activation
ps.AddPage(&pp);


ps.DoModal();


HTH,
chris