Visual C++ and MFC Fundamentals Chapter 3: Windows Resources
#include <afxwin.h>
#include "resource.h"
class CMainFrame : public CFrameWnd
{
public:
CMainFrame ()
{
LoadFrame(IDR_MAINFRAME);
}
};
class CMainApp: public CWinApp
{
public:
BOOL InitInstance()
{
m_pMainWnd = new CMainFrame ;
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();
return TRUE;
}
};
CMainApp theApp;
- Test the application.