Why AfxGetApp() returns NULL in Vc 7.1?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I use AfxGetApp() in my Add-in application as follows.

AfxGetApp()->LoadIcon(IDI_ICON);
AfxGetApp()->BeginWaitCursor();
AfxGetApp()->EndWaitCursor();
AfxGetApp()->PumpMessage()

It works well in Vc 6.0. However, AfxGetApp() returns NULL after I convert
my project to Vc.NET.

Thanks in advance!
 
Back
Top