Location:
Search - afxwin.h
Search list
Description: 设置桌面背景, (1)使用ChangingDesktop需要包含的一些头文件,以及进行初始化
在stdafx.h中
#include <afxwin.h>
#include <wininet.h> //添加这个。注意顺序,顺序乱了也编译不过
#include <afxext.h>
用了com的东西,要进行初始化,不用说了吧。
在CXXXApp::Initinstance中添加AfxOleInit()
使用CChangingDesktop的cpp中
#include <shlobj.h>
-Set the desktop background, (a) use ChangingDesktop need to include some of the header files, as well as to initialize the# include in stdafx.h <afxwin.h># include <wininet.h>// Add this. Note that the order, the order of chaotic, but also compiled# include <afxext.h> Com things used to initialize, not to mention the bar. In CXXXApp:: Initinstance adding AfxOleInit () use CChangingDesktop of cpp in the# include <shlobj.h>
Platform: |
Size: 38912 |
Author: tangkai |
Hits:
Description: 自己建立一个基于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
Platform: |
Size: 15360 |
Author: 夏天 |
Hits:
Description: MFC:微软基础类(Microsoft Foundation Classes),同VCL类似,是一种应用程序框架,随微软Visual C++ 开发工具发布。目前最新版本为10.0(截止2011年3月),并且发布了中文版。该类库提供一组通用的可重用的类库供开发人员使用,大部分类均从CObject 直接或间接派生,只有少部分类例外。 MFC 应用程序的总体结构通常由开发人员从MFC类派生的几个类和一个CWinApp类对象(应用程序对象)组成。MFC 提供了MFC AppWizard 自动生成框架。 Windows 应用程序中,MFC 的主包含文件为"Afxwin.h"。 此外MFC的部分类为MFC/ATL 通用,可以在Win32 应用程序中单独包含并使用这些类。 由于它的易用性,初学者常误认为VC++开发必须使用MFC,这种想法是错误的。作为Application Framework,MFC的使用只能提高某些情况下的开发效率,只起到辅助作用,而不能替代整个Win32 程序设计。,MFC: Microsoft Foundation Class ( Microsoft Foundation Classes ), similar to the VCL, is an application framework, with Microsoft Visual C++ development tools released. The latest version is 10 (as of 2011 March), and released a Chinese version. The library provides a set of generic reusable class library for developers, most classes are derives directly or indirectly from CObject, only a small part of classification. MFC application program architecture usually by the developer of several class derived from the MFC class and a class CWinApp ( object application object ). MFC provides MFC AppWizard automatic generation framework. A Windows application, MFC main include file "Afxwin.h ". In addition MFC partial class for MFC/ATL universal, can be in the Win32 application alone contains and use these classes. Due to its ease of use, beginners often mistakenly believe that the development of VC++ must use the MFC, this is wrong. As Application Framework, MFC use can improve the developmen
Platform: |
Size: 14093312 |
Author: 蔡沛霖 |
Hits: