主框架类-MFC应用程序基础

时间:2024-05-14 23:12:03
【文件属性】:

文件名称:主框架类-MFC应用程序基础

文件大小:1013KB

文件格式:PPT

更新时间:2024-05-14 23:12:03

MFC

主框架类 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); }


网友评论