Click to See Complete Forum and Search --> : DataPropertypage - sheet


Mikael
March 31st, 1999, 02:22 AM
How do I get a pointer to the propertysheet from within a propertypage.

Bob
March 31st, 1999, 10:11 AM
Declare the property sheet in a header file, then refer to it. For example:


//mainfrm.h


CPropertySheet* m_pSheet;


// mainfrm.cpp


m_pSheet.AddPage(&Page1);

m_pSheet.AddPage(&Page2);


// page1.cpp

int nIndex = ((CMainFrame* )AfxGetMainWnd())->m_pSheet->GetActiveIndex();