AfxGetMainWnd() function in VisualStudio 8
Posted on 2006-07-13
I have to port our sourcecode from Visual Studio 6 to Visual Studio 8 (2005).
In the existing code quite at the beginning of the program the function OnNewDocument() is called.
Calls made there to AfxGetMainWnd() return NULL in Visual Studio 8 while they return useful values when the same sourcecode is compiled with Visual Studio 6.
At that point there is still no window drawn