C++ Programming
12-04-2009, 09:41 AM
i created one dialog based application. In that Dlg App class i am calling RegisterShellFileTypes(), in CWInApp::initInstace.
But application is crashing due to no poniter to document class.
code is like this :
CDesktopWallpaperDlg dlg;
m_pMainWnd = &dlg;
EnableShellOpen();
RegisterShellFileTypes();
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
so, can anyone tell me what is the problem exactly?
it working with SDI Application..
Regards,
Srinivas
modified on Thursday, December 3, 2009 6:24 AM
But application is crashing due to no poniter to document class.
code is like this :
CDesktopWallpaperDlg dlg;
m_pMainWnd = &dlg;
EnableShellOpen();
RegisterShellFileTypes();
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
so, can anyone tell me what is the problem exactly?
it working with SDI Application..
Regards,
Srinivas
modified on Thursday, December 3, 2009 6:24 AM