What is the best way to pass information from on page of a wizard property sheet to the next page(s).
cheers
A
Printable View
What is the best way to pass information from on page of a wizard property sheet to the next page(s).
cheers
A
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.
Brian:Would you have any sample code of how you call this information from the derived class?
Cheers
A
In the CPropertyPage derived class:
CMyPropPage::DoStuff()
{
CMyPropSheet *pPropSheet = (CMyPropSheet *)GetParent();
if ( pPropSheet )
{
int nVal = pPropSheet->m_nVal;
}
}
B: sorry for being a pain:
How did you save the info to the derived class, as this is giving me trouble
thanks again
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;
}
}