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