[求助]这个用MFC遍的对话框为什么不能执行呢?
#include<afxwin.h>
class CWelcomeApp:public CWinApp
{
public:
virtual BOOL InitInstance();
};
CWelcomeApp WelcomeApp;
class CWelcomeWindow : public CFrameWnd
{
CStatic *cs;
public:
CWelcomeWindow();
};
BOOL CWelcomeApp::InitInstance()
{ //CWelcomeWindow *m_pMainWnd;
m_pMainWnd=new CWelcomeWindow();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
CWelcomeWindow::CWelcomeWindow()
{
Create(NULL,"Beijing,2008",WS_OVERLAPPEDWINDOW,CRect(0,0,250,250));
cs = new CStatic();
cs->Create("Welcome to Beijing ,2008!",WS_CHILD|WS_VISIBLE|SS_CENTER,CRect(48,50,100,100),this);
}