Skip navigation

So, you’re trying to make an MFC app?

Just to show you how simple it CAN BE, here’s one:

#include <afxwin.h>

class App : public CWinApp
{
public:
  BOOL InitInstance() override 
  {
    this->m_pMainWnd = new CFrameWnd() ;
    ((CFrameWnd*)this->m_pMainWnd)->Create( NULL, TEXT("MFC example!" ) ) ;
    this->m_pMainWnd->ShowWindow( TRUE ) ;

    return TRUE ;
  }
};

App app ;

BEFORE COMPILING, YOU MUST DO THIS in the project’s property page (right click your project name in the “Solution Explorer” and select “Properties”)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: