RE: AfxGetApp() return null
thanks for replay
no, my dll is loded corectly
my class is look like
CPageSeet::CPageSeet(UINT nIDCaption, CWnd* pParentWnd, UINT
iSelectPage,CString str1,CString str2)
// :CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
pApp = AfxGetApp() ; // CWinApp *
/.....
/....
}
i add 2 string in the class
and from the dllmin i pass
function ()
{
CPageSeet * m_WizardPropertySheet = new CPageSeet
(0,NULL,0,str1,str2)
WizardPropertySheet->SetWizardMode();
WizardPropertySheet ->m_psh.dwFlags = PSH_WIZARD ;
WizardPropertySheet ->DoModal();
}
= new CPageSeet(IDC_WIZ_CONFIG, NULL,0);
// CPageSeet m_WizardPropertySheet(IDC_WIZ_CONFIG,
NULL,0 m_WizardPropertySheet->SetWizardMode();
m_WizardPropertySheet->DoModal();
that is all i think
"John" wrote:
hi, i think you should say more details
that i can analyze the reason. beacause so many
reasons can lead to pApp is null,
for example you load dll failure and so on.
"mido1971" wrote:
hi
inside trhe regular dll i have CProprertySheet class i called
CWinApp * pApp = AfxGetApp() ; but the pApp return NULL, what i need to fix
it
thanks for help