ASSERT(pParent);//this is the main window of application
CMyPropertySheet* pSheet;// my based on CPropertySheet
if (!pApp->m_pPSBiblioteka) //here I store the pointer to the dialog (as CWnd*)
{
CString str = _T("Biblioteka");
str.LoadString(IDS_PS_CAPTION);
pApp->m_pPSBiblioteka = new CMyPropertySheet(str);//the constructor calls AddPage() for each page
}
pSheet = (CMyPropertySheet*)(pApp->m_pPSBiblioteka);
if (!pSheet->GetSafeHwnd()) pSheet->Create(pParent);//create if it's not already created
|