Visual C++ and MFC Fundamentals Chapter 3: Windows Resources
- To save the icon, click the system Close button of the window that is displaying
the icon - Change the Exercise.cpp file as follows:
 
#include <afxwin.h>
#include "ResourceDlg.h"class CResApp: public CWinApp
{
public:
BOOL InitInstance();
};class CResFrame : public CFrameWnd
{
public:
CResFrame()
{
Create(NULL, "Resources Fundamentals");
}
};BOOL CResApp::InitInstance()
{
m_pMainWnd = new CResFrame;
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->UpdateWindow();return TRUE;
}CResApp theApp;- Test the application: