May 4th, 1999, 08:49 AM
What is the best way to pass information from on page of a wizard property sheet to the next page(s).
cheers
A
cheers
A
|
Click to See Complete Forum and Search --> : CPropertySheet wizard May 4th, 1999, 08:49 AM What is the best way to pass information from on page of a wizard property sheet to the next page(s). cheers A BrianOG May 4th, 1999, 09:06 AM The way I use is: o Derive a class from CPropertySheet o Use this class to store/manage data o Property pages in the wizard can call GetParent() to get access to this class Hope this works 4 u. May 4th, 1999, 09:28 AM Brian:Would you have any sample code of how you call this information from the derived class? Cheers A BrianOG May 4th, 1999, 09:48 AM In the CPropertyPage derived class: CMyPropPage::DoStuff() { CMyPropSheet *pPropSheet = (CMyPropSheet *)GetParent(); if ( pPropSheet ) { int nVal = pPropSheet->m_nVal; } } May 4th, 1999, 11:43 AM B: sorry for being a pain: How did you save the info to the derived class, as this is giving me trouble thanks again BrianOG May 5th, 1999, 01:51 AM In one page you write the data to the PropSheet class, and in the next page you read it back. CMyPropPage1::SaveStuff() { CMyPropSheet *pPropSheet = (CMyPropSheet *)GetParent(); if ( pPropSheet ) { pPropSheet->m_nVal = nVal; } } CMyPropPage2::ReadStuff() { CMyPropSheet *pPropSheet = (CMyPropSheet *)GetParent(); if ( pPropSheet ) { nVal = pPropSheet->m_nVal; } } codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |