主题:一个程序问题
[size=6][size=5][size=4][size=3]请问各位,这个程序哪里错了?这么总是该不对呢?[/size][/size][/size][/size]#include<afxwin.h>
class CHelloApp:public CWinApp
{
public:
virtual BOOL InitInstance();
};
CHelloApp theApp;
class CMainFrame:public CFrame Wnd
{
public:
CMainFrame()
{
Create(NULL,"我的窗口",WS_OVERLAPPEDWINDOW,CRect(0,0,400,300));
}
protected:
axf_msg void OnLButtonDown(UINT nFlags,CPoint point);
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CMainFrame,CFrameWnd)
ON_WM_LBUTTONDOWN()
END_MESSAGE_MAP()
void CMainFrame::OnLButtonDown(UINT nFlags,CPoint point)
{
MessageBox("你好,我的Visual C++世界!","问候",0);
CFrameWnd::OnLButtonDown(nFlags,point);
}
BOOL CHelloApp::InitInstance()
{
m_pMainWnd=new CMainFrame();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
class CHelloApp:public CWinApp
{
public:
virtual BOOL InitInstance();
};
CHelloApp theApp;
class CMainFrame:public CFrame Wnd
{
public:
CMainFrame()
{
Create(NULL,"我的窗口",WS_OVERLAPPEDWINDOW,CRect(0,0,400,300));
}
protected:
axf_msg void OnLButtonDown(UINT nFlags,CPoint point);
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CMainFrame,CFrameWnd)
ON_WM_LBUTTONDOWN()
END_MESSAGE_MAP()
void CMainFrame::OnLButtonDown(UINT nFlags,CPoint point)
{
MessageBox("你好,我的Visual C++世界!","问候",0);
CFrameWnd::OnLButtonDown(nFlags,point);
}
BOOL CHelloApp::InitInstance()
{
m_pMainWnd=new CMainFrame();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}