教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 文库大全 > 实用文档 >

mfc编程基础(极其重要!)

来源:网络收集 时间:2026-09-27
导读: 第8章 MFC编程基础  章 编程基础 第8章 MFC编程基础 章 编程基础8.1 MFC类库简介 类库简介 8.2 使用 使用AppWizard开发 开发MFC应用程序 开发 应用程序 8.3 MFC应用程序框架与 应用程序框架与Win32程序的关联 应用程序框架与 程序的关联 8.4 MFC应用

第8章 MFC编程基础  章 编程基础

第8章 MFC编程基础 章 编程基础8.1 MFC类库简介 类库简介 8.2 使用 使用AppWizard开发 开发MFC应用程序 开发 应用程序 8.3 MFC应用程序框架与 应用程序框架与Win32程序的关联 应用程序框架与 程序的关联 8.4 MFC应用程序的消息映射 应用程序的消息映射 习 题

第8章 MFC编程基础  章 编程基础

8.1 MFC类库简介 类库简介下面是MFC类库的类定义文件afxwin .h中的类说明 部分源代码,从中我们可以了解MFC类库中都有哪些 类以及它们的层次关系。代码如下: class CSize; class CPoint; class CRect; //CObject //CException

第8章 MFC编程基础  章 编程基础 //CSimpleException class CResourceException;// Win resource failure exception class CUserException; // Message Box alert and stop operation class CGdiObject; // CDC drawing tool class CPen; // a pen / HPEN wrapper class CBrush; // a brush / HBRUSH wrapper class CFont; // a font / HFONT wrapper class CBitmap; // a bitmap / HBITMAP wrapper class CPalette; // a palette / HPALLETE wrapper class CRgn; // a region / HRGN wrapper

第8章 MFC编程基础  章 编程基础 class CDC; // a Display Context / HDC wrapper class CClientDC; // CDC for client of window class CWindowDC; // CDC for entire window class CPaintDC; // embeddable BeginPaint struct helper class CMenu; // a menu / HMENU wrapper class CCmdTarget; // a target for user commands class CWnd; // a window / HWND wrapper

第8章 MFC编程基础  章 编程基础 class CDialog; class CStatic; class CButton; class CListBox; checks class CComboBox; class CEdit; class CScrollBar; // ComboBox control // Edit control // ScrollBar control // a dialog // Static control // Button control // ListBox control

// standard windows controls

class CCheckListBox; // special listbox with

第8章 MFC编程基础  章 编程基础 // frame windows class CFrameWnd; // standard SDI frame class CMDIFrameWnd; // standard MDI frame class CMDIChildWnd; // standard MDI child class CMiniFrameWnd; // half-height caption frame wnd

第8章 MFC编程基础  章 编程基础 // views on a document class CView; // a view on a document class CScrollView; // a scrolling view class CWinThread; // thread base class class CWinApp; // application base class class CDocTemplate; // template for document creation class CSingleDocTemplate; // SDI support class CMultiDocTemplate; // MDI support class CDocument; // main document abstraction

第8章 MFC编程基础  章 编程基础 // Helper classes class CCmdUI; // Menu/button enabling class CDataExchange; // Data exchange and validation context class CCommandLineInfo; //CommandLine parsing helper class CDocManager; // CDocTemplate manager object

第8章 MFC编程基础  章 编程基础 下面按功能对MFC库中的常用类做一简要介绍。 1

.根类CObject .根类 Microsoft基本类库中的大多数类都是由CObject类 派生而来的。CObject对所有由它派生出的类提供了有 用的基本服务。 2.MFC应用结构类 . 应用结构类 MFC应用结构类用于构造一个应用的框架,对大 多数应用提供了通用功能。我们可以在框架中填写对 于应用特定的功能。

第8章 MFC编程基础  章 编程基础 AppWizard可以产生几种类型的应用,所有这些都 以不同的方式使用应用框架。 1) 应用程序和线程支持类 2) 命令例程类 3) 文档类 4) 文档模板类

第8章 MFC编程基础  章 编程基础 3.窗口、对话框和控件类 .窗口、 1) CWnd类 2) 框架窗口类 3) 对话框类 4) 视图类 5) 控件类 6) 控件条类

第8章 MFC编程基础  章 编程基础 4.菜单类 . 5.绘图和打印类 . 6.简单的数据类型类 . 7.数组、列表和映射类 .数组、 8.文件和数据库类 . 1) 文件 类 文件I/O类 2) DAO类 类 3) ODBC类 类

第8章 MFC编程基础  章 编程基础 9.Internet和网络类 . 和网络类 Internet和网络类允许与其他使用ISAPI的计算机或 一个Windows Socket交换信息。 10.OLE类 . 类 11.调试和异常类 .

第8章 MFC编程基础  章 编程基础

8.2 使用 使用AppWizard开发 开发MFC应用程序 开发 应用程序8.2.1 生成 生成MFC应用程序框架 应用程序框架 例8-1 应用程序。 建立MFC应用程序框架一般可以通过以下步骤来 实现: (1) 启动MFC AppWizard:定义项目名称。在File 菜单下选择New,出现如图8-l所示的New对话框。 使用MFC AppWizard生成一个简单的MFC

第8章 MFC编程基础  章 编程基础

图8-1 New对话框

第8章 MFC编程基础  章 编程基础 在图8-1中选择MFC AppWizard[exe],在Project name文本输入框中输入新建的项目名如Mymfc后,单 击OK按钮,将弹出MFC AppWizard-Step 1对话框,如 图8-2所示。

…… 此处隐藏:1550字,全部文档内容请下载后查看。喜欢就下载吧 ……
mfc编程基础(极其重要!).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wenku/1106623.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150份
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150份
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)