Click to See Complete Forum and Search --> : Haw can I use a modeless PropertySheet in a MFC DLL


George Ghita
May 31st, 1999, 06:47 AM
I try with:

AFX_MANAGE_STATE(AfxGetStaticModuleState());
m_pView= new CViewPage; // derived from CPropertyPage
m_pEdit= new CEditPage; // derived from CPropertyPage

m_pSheet= new CPropertySheet("Title");
m_pSheet->m_psh.dwFlags |= PSH_NOAPPLYNOW;

m_pSheet->AddPage(m_pView);
m_pSheet->AddPage(m_pEdit);

m_pSheet->Create();





and:

HMODULE hDLL = GetModuleHandle("My.dll");
HINSTANCE hEXE = AfxGetResourceHandle();
AfxSetResourceHandle((HINSTANCE) hDLL);

m_pView= new CViewPage; // derived from CPropertyPage
m_pEdit= new CEditPage; // derived from CPropertyPage

m_pSheet= new CPropertySheet("Title");
m_pSheet->m_psh.dwFlags |= PSH_NOAPPLYNOW;

m_pSheet->AddPage(m_pView);
m_pSheet->AddPage(m_pEdit);

m_pSheet->Create();

AfxSetResourceHandle(hEXE);




and don’t work.