|
-
May 31st, 1999, 06:47 AM
#1
Haw can I use a modeless PropertySheet in a MFC DLL
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|