#include<afxwin.h>
class myframe:public CFrameWnd
{
public:
myframe()
{
Create(0,"HELLO");
}
void OnPaint()
{
CPaintDC dc(this);
dc.TextOut(350,250,"WELCOME");
}
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(myframe,CFrameWnd)
ON_WM_PAINT()
END_MESSAGE_MAP()
class myapp:public CWinApp
{
virtual BOOL InitInstance()
{
m_pMainWnd=new myframe;
m_pMainWnd->ShowWindow(1);
m_pMainWnd->UpdateWindow();
return TRUE;
}
};
myapp app;
Asvantages of using MFC libraries..
MFC is the easiest way for you to achieve two kinds of portability:
- Portability among different operating systems
- Portability among different processors
No comments:
Post a Comment