文件名称:gd
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:14.74kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
自己建立一个基于MFC的程序,并能对鼠标左键单击操作进行响应(弹出消息框)。
在程序编写过程中注意以下几点:
(1) 建立工程的类型(Win32 Application)及需要包含的头文件(afxwin.h)
(2) 从CWinApp派生自己应用程序类,从CFrameWnd派生自己框架窗口类
(3) 注意程序的构建过程:从应用程序类对象开始,调用基类构造函数,在其中调用InitInstance(),因其为虚函数,会调用自己重载的InitInstance(),我们可以在其中创建窗口。
(4) 在MFC程序中使用宏进行消息映射, 消息的处理放在框架程序中。
BEGIN_MESSAGE_MAP(…,…)
…//消息映射宏
END_MESSAGE_MAP
-Build a MFC-based program, and can operate on the left mouse button click to respond (pop-up message box). In the programming process note the following: (1) the establishment of project types (Win32 Application) and the need to include the header file (afxwin.h) (2) derived from its own application class CWinApp, CFrameWnd derived from their own frame window class (3) Note that the program construction process: starting from the application class object, call the base class constructor, in which the call to InitInstance (), because the virtual function will call itself overloaded InitInstance (), in which we can create window. (4) use the macro in the MFC program for message maps, message handling on the framework of the program. BEGIN_MESSAGE_MAP (..., ...) ...// Message map macros END_MESSAGE_MAP
在程序编写过程中注意以下几点:
(1) 建立工程的类型(Win32 Application)及需要包含的头文件(afxwin.h)
(2) 从CWinApp派生自己应用程序类,从CFrameWnd派生自己框架窗口类
(3) 注意程序的构建过程:从应用程序类对象开始,调用基类构造函数,在其中调用InitInstance(),因其为虚函数,会调用自己重载的InitInstance(),我们可以在其中创建窗口。
(4) 在MFC程序中使用宏进行消息映射, 消息的处理放在框架程序中。
BEGIN_MESSAGE_MAP(…,…)
…//消息映射宏
END_MESSAGE_MAP
-Build a MFC-based program, and can operate on the left mouse button click to respond (pop-up message box). In the programming process note the following: (1) the establishment of project types (Win32 Application) and the need to include the header file (afxwin.h) (2) derived from its own application class CWinApp, CFrameWnd derived from their own frame window class (3) Note that the program construction process: starting from the application class object, call the base class constructor, in which the call to InitInstance (), because the virtual function will call itself overloaded InitInstance (), in which we can create window. (4) use the macro in the MFC program for message maps, message handling on the framework of the program. BEGIN_MESSAGE_MAP (..., ...) ...// Message map macros END_MESSAGE_MAP
(系统自动生成,下载前可以参看下载内容)
下载文件列表
gd.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.