I have this code :
CMainFrame* pFrame = NULL;
fsnew1 (pFrame, CMainFrame);
m_pMainWnd = pFrame;
if (FALSE == pFrame->LoadFrame(IDR_MAINFRAME, WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL, NULL))
{
DWORD err = GetLastError();// error code 1401 is returned
return FALSE;
}
In debug mode the if condition is false and so no error is there and my dialog frame gets loade successfully. But in release mode if condition gets true as LoadFrame returns false and frame never gets loaded.
What may be the issue?