资源介绍
主框架类
class CMainFrame:public CFrameWnd{
public:
CMainFrame(){
Create(NULL,"My Window", WS_OVERLAPPEDWINDOW, CRect(0,0,400,300));
}
protected:
afx_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("Hello World, Welcome to Visual C++!", "Welcome",0);
CFrameWnd::OnLButtonDown(nFlags,point);
}
- 上一篇: Visual C++通用范例参考大全VC实例
- 下一篇: 分析MFC应用程序-MFC应用程序基础