Code:
#include<afxwin.h>
#include "resource.h"
class myframe:public CFrameWnd
{
public:
	myframe()
	{
		Create(0,"Text Editor",WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX,rectDefault,
			0,MAKEINTRESOURCE(IDR_MENU1));
	}
};

class myapp:public CWinApp
{
public:
	int InitInstance()
	{
		myframe *p;
		p=new myframe;
		p->ShowWindow(1);
		m_pMainWnd = p;

		return 1;
	}
};
myapp a;