#define _AFXDLL
#include<afxwin.h>
class Cex05Window:public CFrameWnd
{
CStatic* cs;
public:
Cex05Window();
};
Cex05Window::Cex05Window()
{
Create(NULL,"ex05",WS_OVERLAPPEDWINDOW,CRect(100,100,500,300));
cs=new CStatic();
cs->Create("欢迎使用vs2010!",WS_CHILD|WS_VISIBLE|SS_CENTER,CRect(50,50,300,100),this);
}
class Cex05App:public CWinApp
{
public:
Cex05App(){};
public:
virtual BOOL InitInstance();
};
BOOL Cex05App::InitInstance()
{
CWinApp::InitInstance();
m_pMainWnd=new Cex05Window();
m_pMainWnd->ShowWindow (m_nCmdShow);
MessageBox(0,"请点击确定按钮","欢迎使用vs2010!",0);
return FALSE;
}
Cex05App MyApp;
相关分类