CDialog动态创建无资源工具条方法

纠结了好一会!汗

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
1,01.zipMFC Extension LibraryMFC扩展界面库, 使用Visual C++ 6.0(15KB)2,02.zipVisual Studio style UIVisual Studio风格的界面效果(15KB)3,03.zipInternet Explorer 4 style UIIE4.0风格的界面效果(29KB)4,04.zipOutlook Style UIOutlook风格的界面效果(16KB)5,05.zipDynamic child window repositioning动态改变对话框的大小, 对话框中的控件相应改变(15KB)6,06.zipEnhanced list control增强的List控件(43KB)7,07.zipCDialog using animated control在CDialog中使用动画(12KB)8,08.zipOpen Dialog with Bitmap Preview位图预览的打开文件对话框(43KB)9,09.zipStandard file open dialog with preview标准位图预览的打开文件对话框(24KB)10,10.zipBitmap Dialog Class位图对话框类(13KB)11,11.zipClass for Browsing shell namespace with your own dialog显示目录的树型结构, 可用于目录的选择(31KB)12,12.zipUsing ON_UPDATE_COMMAND_UI with dialogs在对话框中使用ON_UPDATE_COMMAND_UI(13KB)13,13.zipUsing ON_UPDATE_COMMAND_UI with dialogs (2)使用ON_UPDATE_COMMAND_UI(11KB)14,14.zipModeless child dialog in a Main Dialog with corrected tab order非模式对话框在主对话框中的TAB顺序(21KB)15,15.zipCostumizing CFileDialog定制的CFileDialog(22KB)16,16.zipAttaching Elements to Borders一个可以在对话框中改变按纽位置、大小的容器(26KB)17,17.zipScrolling credits dialog滚动信用对话框(12KB)18,18.zipColor Dialog with Persistent Custom Colors对话框继承了上一次的颜色风格(12KB)19,19.zipA Base Dialog Class for Modal/Modeless Dialog with Custom Background Color自定义背景的对话框(13KB)20,20.zipParse IP addresses解析IP地址(12KB)21,21.zipParse phone fields解析电话区域(11KB)22,22.zipChanging the default file open/save dialogs in an MFC doc/view application初始化对话框和支持动态数据交换(DDX)(15KB)23,23.zipDialog with Splash Screen Example Code...Splash对话框的例子(18KB)24,24.zipClass to select directory选择目录的类(13KB)25,25.zipClass to select directory (Enhancements)增强的选择目录的类(12KB)26,26.zipDirectory Picker Dialog目录采集对话框(42KB)27,27.zipSimple way to change dialog's background and text colors改变对话框背景颜色和文字颜色的简单途径(11KB)28,28.zipA Simple Dialog Layout Manager一个简单的对话框设计管理器(19KB)29,29.zipUsing Buttons on a Dialog Bar with CCmdUI通过CCmdUI在对话框条中使用按纽(19KB)30,30.zipDisplay help for dialog controls on the status bar在状态条中显示对话框中控件的帮助信息(12KB)31,31.zipDragging a dialog by clicking anywhere on it点击任何地方拖动对话框(11KB)32,32.zipSplash screen with text on it that uses its own thread通过自己的线程在Splash对话框中显示文字(136KB)33,33.zipCreating an expanding dialog创建一个可扩展的对话框(15KB)34,34.zipExpanding/Contracting Dialog Box扩展/缩小对话框(24KB)35,35.zipCFileDialog class that only displays folders让CFileDialog只显示目录(很有用)(2KB)36,36.zipFolder Browsing Dialog目录浏览对话框(3KB)37,37.zipFont dialog with custom text preview & color字体对话框中增加字体和颜色的预览(12KB)38,38.zipEmbedding an HTML Help window into a dialog嵌入一个超文本(HTML)的帮助窗口到对话框中(22KB)39,39.zipDialog which can be used as MDI child window使用MDI子窗口的对话框(13KB)40,40.zipConvert modal dialogs to modeless将模式对话框转换成非模式对话框(12KB)41,41.zipNetscape 4.x Preferences Dialog类似Netscape 4.x参数选择的对话框(7KB)42,42.zipHandling OnUpdate() processing for menu itemsOnUpdate()处理菜单项(5KB)43,43.zipOptions Tree Dialog树状的配置对话框(25KB)44,44.zipCustomizing the font dialog定制的字体对话框(4KB)45,45.zipSizable dialogs at its easiest轻松改变对话框的大小(5KB)46,46.zipA Snap Size Dialog Class一个捕获对话框大小的类(5KB)47,47.zipCSplitterWnd in a Dialog based Application一个基于对话框的应用(6KB)48,48.zipSplash Screen with 256 color support支持256色的Splash对话框(7KB)49,49.zipSubselection Dialog 子项选择的对话框(5KB)50,50.zipSwitching dialog boxes in a dialog-based application在基于对话框应用中切换对话框(5KB)51,51.zipBetter Tip of the Day dialog典型的Did you konw...对话框(26KB)52,52.zipToolbars and Statusbars on Dialogs在对话框中增加工具条和状态条(7KB)53,53.zipTooltips in modal dialog boxes在模式对话框中实现工具提示(6KB)54,54.zipTooltips for dialog controls实现对话框控件的工具提示(4KB)55,55.zipTransparent Dialog透明的对话框(5KB)56,56.zipViewing Dialog Template Resources at Runtime运行时看对话框模板资源(5KB)57,57.zipAlternative Wizard Dialog一个Wizard对话框, 在安装程序中也有用(5KB)58,58.zipAVLTree实现AVL(Addison-Velski and Landis)树结构(5KB)59,59.zipTemplate class to manipulate bits of undefined type一个操作未知类型的模板库(5KB)60,60.zipBlowfish EncryptionBlowfish加密算法加密(4KB)61,61.zipBlowfish encryption classBlowfish加密类(5KB)62,62.zipExpression Evaluation数学公式识别类(5KB)63,63.zipA Y2.038K-Safe Replacement for CTimeCTime的替换类(5KB)64,64.zipIterating through List Containers关于List容器的话题(5KB)65,65.zipLexical Analyser词汇分析(8KB)66,66.zipLocales and Facets in Visual C++VC++的许多细节话题(10KB)67,67.zipA Generalized Parsing Class for MFC一个普通的MFC解析类(5KB)68,69.zipCreating Singleton Objects using Visual C++使用VC++创建一个单独的对象(9KB)69,69.zipSmart Pointers and other Pointer classes指针类(5KB)70,70.zipSortable CObArray class对CObArray类排序(5KB)71,71.zipSortable CObList class对CObList类排序(6KB)72,72.zipExtension to the STL find_if and for_each扩充STL库(5KB)73,73.zipChange from child window to popup window (and back) 将一个子窗口改成弹出式窗口(5KB)74,74.zipRestoring Window Position With Multiple Monitors在多层监视器中恢复窗口的位置(5KB)75,75.zipTransparent Window透明的窗口(6KB)76,CenterMDIWnd_demo.zipCenter CMDIChildWnds in the client area of the main frame window(151KB)77,TabbedMDI.zipA variation on the MDI that indicates the open child windows in a tab control. (400KB)78,AdvancedPrev.zipA simple class that helps provide faster Print Preview within MFC Doc/View applications(38KB)79,mditab.zipA dockable bar containing a tabbed list of open windows(91KB)80,CloseUnusedDocs_src.zipClosing unused MDI documents with 1 line of code(2KB)81,graphfx_demo.zipA Doc/View framework for displaying graphical data(192KB)82,WindowsManager.zipImplementing "Windows..." dialog(39KB)83,MultiMRUList_src.zipThis article describes how to maintain the separate MRU list for each document type that is needed in some applications(26KB)84,MultiTop.zipAllows an application to have multiple top-level windows. (22KB)85,PersistFrames.zipA collection of classes that allows MFC SDI and MDI applications to remember the positions and sizes of their main frame and child frame windows. (71KB)86,step0.zipA series of articles that resulted from experimenting with adding Drag and Drop features to my existing application. (16KB)87,undo.zipEasily add Undo/Redo to your CDocument/CView Based Applciation(2KB)88,PropertyView.zipA "Property Sheet"-like view class for MFC (108KB)89,DocViewWTL.zipA library that provides the easiest way to get loosely coupled components. (156KB)90,Dialog2.zipA step by step tutorial showing how to create your first windows program using MFC(112KB)91,MyMDIApp.zipA brief step-by-step tutorial that demonstrates creating an SDI and MDI based applications using the MFC Doc/View architecture.(54KB)92,sditutorial_demo.zipA brief step-by-step tutorial that demonstrates creating an SDI based application that does not use the MFC Doc/View architecture.(15KB)93,QuickWin.zipRedirect stdin, stdout and stderr into a window(125KB)94,GradientTitleBar.zipThis article shows you how to give your Win95/NT4 modeless dialogs a Win98/W2K like gradient title bar.(42KB)95,MsgBoxDemo.zipThe system Message Box that is closed atuomatically after some time(21KB)96,step1.zipSimple step by step article explaining how to create a modeless dialog box as child window.(21KB)97,step2.zipSimple step by step article explaining how to create a modeless dialog box as sibling of the app's main window.(22KB)98,ResizableDialog.zipA CDialog derived class to implement resizable dialogs with MFC (98KB)99,CenterAnywhere_demo.zipThis is a good replacement for CWnd::CenterWindow() that works. (43KB)100,CardDialog.zipA auto-sizing dialog used to store and display smaller child dialogs(22KB)101,scrolling_credits.zipA Scrolling Credits Dialog(209KB)102,snapdialog.zipDialog class that implement a snap-to-screen-border feature like Winamp(16KB)103,messagebox.zipA class which encapsulates MessageBoxIndirect.(18KB)104,rfldlg.zipThis article demonstrates how to add a recent file list to a dialog based application(25KB)105,dialogspl_demo.zipSplash screens are not only for Doc/View based applications(142KB)106,CClockCtrl_src.zipA Freeware MFC class to display an analog clock.(17KB)107,ChildDlg.zipChild Dialog (Sub Forms)(29KB)108,CIconDialog_src.zipA Freeware MFC dialog class to select an icon.(12KB)109,CPushPinFrame_src.zipA Freeware MFC PushPin property page dialog class.(19KB)110,showhide.zipA neat way to show/hide groups of related controls(13KB)111,ResizeCtrl.zipA resize control to implement resizable dialogs with MFC(38KB)112,DDXFile_src.zipA Freeware DDX routine for selecting a filename.(29KB)113,DynWindow_src.zipDescribes a method to implement resizable child windows.(108KB)114,DynamicDialog.zipCreate dialogs dynamically, and easily, without the need for a dialog resource script.(40KB)115,DlgExpand.zipThis article shows gives you the ability to make your dialogs expand or contract, depending on how much information the user wishes to view(15KB)116,TipDemo.zipImproved Tip-of-the-Day Dialog(149KB)117,layoutmgr.zipA framework to provide automatic layout control for dialogs and forms(101KB)118,MainWndPlacement.zipSave/restore the main window size at application exit/startup with a single function call in MDI, SDI and dialog based applications.(29KB)119,sizer_demo.zipAn article on extendable layout management classes(27KB)120,Splasher_src.zipAn improved splash screen component for MFC.(62KB)121,StackDialog.zipCreating a stacked dialog such as Netscape's 'Preferences' dialog(22KB)122,bitmappreviewdialog_src.zipThis article describes a completely object oriented standard file open dialog with preview.(12KB)123,subselect_dialog.zipSubselection Dialog(123KB)124,TabDialog.zipA docking dialog that auto-expands when the mouse passes over it(35KB)125,TcxMsgBox.zipTCX Message Box (derived from CWnd)(35KB)126,ToolTips.zipA demonstration of how to show tooltips in modal dialog bozes(23KB)127,UpdateModalDlg_demo.zipHow to update a modal dialog contents using a callback function(17KB)128,WinampWnd_demo.zipAn article discussing a Plugin for Nullsoft Winamp which looks and behaves like the Winamp UI.(43KB)129,Skins.zipA mini library to build Bitmap based skinnable apps.(174KB)130,FaderWnd_demo.zipAn MFC class to fade any window with only one line of code.(28KB)131,Win2kFileDlg.zipEver wanted to use the new Office 2000 file dialogs on Win 95/98/NT/Me, including the file previewing? Well now you can.(76KB)132,win2000fd.zipHow to show the new Common File Dialog in MFC Apps in Windows 2000(36KB)133,Wizard2000.zipCreate Windows 2000 style Wizards with white backgrounds(109KB)134,FileExportDialog.zipAdding filters to the Open File dialog(24KB)135,customize_dialog.zipCustomizing the Windows Common File Open Dialog(15KB)136,SelectFolder.zipThe windows 'Select Folder' dialog with some extra functionality(41KB)137,animate_dlg.zipAnimated Icon on Titlebar of a Dialog based Application(34KB)138,BmpDlg.zipBitmap Dialog Class(52KB)139,namespace.zipClass for Browsing shell namespace with your own dialog(78KB)140,OnUpdate_demo.zipHandling OnUpdate() processing for menu items(10KB)141,DialogUpdates.zipUsing ON_UPDATE_COMMAND_UI with all controls in a Dialog(18KB)142,override.zipCustomizing the font dialog(4KB)143,cmdlg.zipCostumizing CFileDialog(31KB)144,custom_open.zipCustom Open File or Save as Dialog(25KB)145,ColorFormView.zipCFormView Class with Custom Background Color(33KB)146,Banner.zipAnimated Background Banner(88KB)147,MDIClient.zipA Custom MDI Client Class(42KB)148,html_help_view.zipHTML Help In CView Window(5KB)149,MDIPreview_demo.zipPrint Preview in MDI Frame(20KB)150,zoom_scale.zipAdd Zoom and Scale Capabilities to CScrollView(338KB)151,autopan.zipAuto-Panning Windows(44KB)152,autopan2.zipMicrosoft Internet Explorer like Intellimouse AutoScroll(42KB)153,intellipan.zipIntellimouse panning (improved Auto-Panning Windows)(5KB)154,intellipan2.zipIntellimouse panning 2 (A universal Auto-Panning solution)(12KB)155,bigscroll.zipBreaking the CScrollView 32768 size limitation with CBigScrollView(90KB)156,variable_splitter.zipVariable splitter views(58KB)157,TabbedViews_src.zipTabbed Views(78KB)158,animate_icon_src.zipAnimated Icon on Titlebar of a window(48KB)159,msdi1632.zipMultiSingle (MSDI) Document interface(77KB)160,msdidao.zipMultiSingle (MSDI) Document interface with DAO doc(508KB)161,ScreenSwitch_demo.zipMultiple Views Using SDI(26KB)162,multiview.zipMultiple views for a single document (MDI) 3(86KB)163,WinMenu_demo.zipHome made MDI windows list in Window menu(21KB)164,SdiMulti.zipSDI Interface with Multi-Views and Multi-Splitters(88KB)165,DocViewInDll_demo.zipSeparating the views of an MDI application into different DLLs(60KB)166,MultiFrame_demo.zipMultiple frame windows in SDI application(76KB)167,mrcext.zipResizable Docking Window(862KB)168,sizing.zipSizing TabControlBar(46KB)169,devstudio.zipAnother DevStudio-alike DialogBar(43KB)170,docking.zipResizable Docking Window 2(98KB)171,simple_splitter.zipGeneral Purpose Splitter Class(43KB)172,cxysplitter.zipA pair of splitter classes used in dialogbox(21KB)173,dynamic_splitter.zipSplitter Window - "True" dynamic splitter window(52KB)174,outlook_style.zipOutook Style Splitter Bar(59KB)175,minsplit.zipMinimum size splitter(36KB)176,scrbsplt.zipRemoving and reapplying splitter windows on-the-fly in Scribble with a custom splitter window class(157KB)177,switchviews_in_splitter.zipSwitching views in splitter panes (SDI)(44KB)178,rulers_src.zipImplementing Rulers inside of Splitter Panes(5KB)179,dynamic1.zipDifferent Views In Dynamic Splitter(202KB)180,dialogstartupanimation.zipThis sample shows you how to create dialog startup animation like that of Window 98'menu(18KB)181,yqeditgridcontrol.zipa grid control that enable keyboard input. That is to say, you can write data in it. (31KB)182,switchmdiviews.zipThis sample shows you how to switch from one view to the other in a MDI splitter window application(31KB) 183,yqmdireplaceview.zipThis sample shows you how to replace different views in a MDI splitter window application(36KB) 184,switchview.zipThis sample shows you how to switch from one MDI window to another by using the "Ctrl Tab" key.(29KB) 185,filterreturnkey.zipThis sample shows you how to trap, filter the ENTER and ESCAPE key of a dialog box (17KB)186,filterkey.zipThis sample shows you how to filter a certain key and mask that key(18KB)187,editenter.zipThis sample shows you how to use RETURN key to switch among edit controls of a dialog box(18KB)188,dialoghook.zipThis sample shows you how to set keyboard hook function of a dialog box to trap RETURN ,ESCAPE key.(17KB) 189,contexthelp.zipThis sample shows you how to create context sensitive help of a control of a dialog box(26KB) 190,traparrokey.zipThis sample describes how to trap arrow keys in an control of a dialog box (18KB)191,yqadvancedbtn.zipOwner draw hot button support both bitmap and icon, with flat, gripper property. (108KB)192,drawlistbo.zipOwner draw CTabCtrl with flat gripper property (40KB)193,startupanimation.zipCreate Window startup animation, including several kind of animation style, very interesting(23KB) 194,flatlistbox.zipusing a unique way to implement flat attribute( other than those published on the codegurn), as well as hot ,gripper attribute.(21KB) 195,yqhoteditctrl.zipCreate edit control with Hot , flat, gripper. separator attributes (21KB)196,3dmdishadow.zipCreate 3D shadow of a MDI frame windows(32KB) 197,3dsdishadow.zipCreate 3D shadow of a SDI frame windows(29KB)198,getfile.zipA DDX routine for MFC to retrieve filenames(29KB)199,splasher.zipAn improved splash screen component for MFC(62KB)200,pushpin.zipA pushpin button MFC class(12KB)201,getfolder.zipA DDX routine for MFC to retrieve folders(30KB)202,ntray.zipAn MFC class to manipulate tray icons(17KB)203,hlinkctrl.zipAn MFC class to support hyperlinks on windows and dialogs(16KB)204,icondialog.zipAn icon selection dialog class for MFC(12KB)205,pushpinframe.zipAn MFC class to provide property dialogs ala Developer Studio(16KB)206,mappin.zipAn MFC class to implement map pins(286KB)207,iconcombobox.zip2 MFC classes to implement icon selection combo boxes(19KB)208,menuex_demo.zipImplementing an Ownerdrawn menu (35KB)209,bcmenu261.zipCool Owner Drawn Menus with BitmapsVersion 2.61(70KB)210,dynmenu.zipSome handy functions for adding and deleting submenus and menuitems in runtime (16KB)211,gradientmenu.zipCreate Popup menus in MFC with a gradient and text on the left side (89KB)212,menuicon_demo.zipGive your apps a unique look by adding a logo to your menu(48KB)213,bcgbappwizard.zipBCGControlBar library version 4.6(2121KB)214,mpcstatusbar.zipAn enhanced CStatusBar to easily and dynamically add/remove controls on a status bar (48KB)215,textonlystatusbar.zipAn easy to use and implement Text Only Status Bar with Tool tip text extracted from the status bar panes. (39KB)216,progressbar.zipShowing progress bar in a status bar pane(33KB)217,sizecbar_src.zipDevStudio-like docking window (64KB)218,sizing_tabct1_demo.zipCreates a dockable and resizable control bar. (46KB)219,dockview.zipA fairly simple way to incoporate views into sizing control bars(69KB)220,spin_slide_toolbar.zipHow to create toolbars with spinners and/or sliders(48KB)221,tearoffrebars_prj.zipThis article Implements the functionality similar to the Office 2000 toolbars(26KB)222,flatbar.zipA flat toolbar implementation that does not require the updated common controls library from Internet Explorer. (197KB)223,toolbar_droparrow_demo.zipDemonstrates how to use the new toolbar styles to add dropdown arrows to toolbar buttons (28KB)224,dynamictb.zipA simple tutorial that shows how to dynamically replace toolbars at runtime (35KB)225,toolbar_docking_demo.zipDemonstrates how to dock toolbars side-by-side (29KB)226,tapetoolbar.zipA spectacular variation on toolbars (35KB)227,chevions.zipAn introduction to using the cool new toolbar chevrons (18KB)228,toolgroupmanager.zipA reusable template class for managing multiple toolbars, only one of which is displayed at a time(30KB)229,toolbar_hotbuttons_demo.zipDemonstrates how to add rollover buttons to your toolbar(30KB)230,toolbar.zipWTL Tool Bar Drop-Down Extension(64KB)231,win95asm.zipIntroduction to Menus(113KB)232,outbar.zipCGfxOutBarCtrl, an Outlook98 bar-like control(163KB)233,tabstatus.zipAdvanced UI - MDI list in the status bar (and a custom Window List dialog)(62KB)234,gfxlist.zipList Control - Enhanced list control(1544KB)235,maillook.zipInternet Mail Look(42KB)236,cdxcdynamic.zipDynamic child window repositioning for dialogs, property sheets, form views and any other CWnd derived classes. (227KB)237,voicecmd.zipVoice Command Enabling Your Software (27KB)238,cj60lib.zipMFC Extension Library - CJ60 Version 6.07(1100KB)239,infobar.zipInformation Bar (62KB)240,switcher.zipA Switcher Control (like the Windows Task Bar) (40KB)
第1章 Windows程序设计基础 1 1.1 Windows概述 1 1.1.1 Windows的发展历史 1 1.1.2 Windows的技术特点 2 1.2 Windows程序特点 3 1.2.1 程序组成 3 1.2.2 数据类型 4 1.2.3 匈牙利命名法 6 1.2.4 Windows消息 7 1.2.5 运行模式 8 1.3 简单的Windows程序介绍 9 1.3.1 开始之前 9 1.3.2 WinMain函数 10 1.3.3 注册窗口类 11 1.3.4 建立窗口 13 1.3.5 窗口函数 14 1.3.6 窗口内的输出 15 1.4 上机步骤 16 1.4.1 进入开发环境 16 1.4.2 新建项目 17 1.4.3 修改项目选项 17 1.4.4 添加程序文件 18 1.4.5 编辑程序 18 1.4.6 调试运行 18 1.5 小结 19 1.6 练习题 19 第2章 MFC程序设计基础 21 2.1 MFC概述 21 2.1.1 MFC与应用程序框架 21 2.1.2 MFC的组成 21 2.1.3 MFC中的类 22 2.2 MFC程序的特点 23 2.2.1 概述 23 2.2.2 MFC与消息处理 23 2.2.3 运行模式 24 2.3 简单的MFC程序 25 2.3.1 开始之前 25 2.3.2 派生应用程序类 25 2.3.3 派生窗口类 26 2.3.4 建立窗口 26 2.3.5 加入消息映射 27 2.3.6 建立MFC应用程序对象 28 2.4 上机步骤 28 2.4.1 建立项目 28 2.4.2 修改项目属性 28 2.4.3 调试运行 28 2.5 使用资源 29 2.5.1 建立图标资源 29 2.5.2 在程序中使用图标资源 31 2.6 小结 31 2.7 练习题 32 第3章 常用MFC通用类 33 3.1 CRect、CPoint、CSize类 33 3.1.1 CRect类 33 3.1.2 CPoint类 33 3.1.3 CSize类 34 3.2 CString类 34 3.2.1 创建字符串 34 3.2.2 访问字符串数据 35 3.2.3 字符串的比较 36 3.2.4 子串函数 38 3.2.5 字符串处理函数 39 3.3 集合类 39 3.3.1 列表类CList 40 3.3.2 数组类CArray 43 3.3.3 映射类CMap 45 3.4 时间处理类 47 3.4.1 COleDateTime类 47 3.4.2 COleDateTimeSpan类 51 3.5 异常处理类 52 3.5.1 异常处理类的使用 53 3.5.2 MFC异常处理类简介 53 3.6 小结 54 3.7 练习题 55 第4章 文档视图程序 56 4.1 概述 56 4.2 文档 56 4.2.1 单文档对象程序 56 4.2.2 多文档对象程序 57 4.2.3 多文档类型程序 58 4.3 视 58 4.3.1 一个文档对象对应一个视对象 58 4.3.2 一个文档对象对应多个视对象 59 4.3.3 一个文档对应多个视类型 59 4.4 窗口框架 59 4.5 文档模板 60 4.6 建立标准单文档程序框架 61 4.6.1 新建项目 61 4.6.2 修改项目选项 62 4.6.3 完成向导 64 4.6.4 运行结果 65 4.7 单文档程序框架分析 66 4.7.1 Stdafx.h 66 4.7.2 Stdafx.cpp 67 4.7.3 0401.h 67 4.7.4 0401.cpp 68 4.7.5 MainFrm.h 72 4.7.6 MainFrm.cpp 73 4.7.7 TextDoc.h 77 4.7.8 TextDoc.cpp 78 4.7.9 TextView.h 81 4.7.10 TextView.cpp 82 4.8 小结 85 4.9 练习题 85 第5章 绘图输出 86 5.1 GDI与MFC 86 5.1.1 概述 86 5.1.2 设备环境类 87 5.1.3 GDI对象类 87 5.2 绘制图形 88 5.2.1 开始绘图 88 5.2.2 更改画笔 91 5.2.3 使用画刷 92 5.2.4 使用位图 93 5.3 输出文本 99 5.3.1 文本输出函数 99 5.3.2 更改文本颜色 100 5.3.3 更改字型、字体 102 5.4 坐标与坐标模式 106 5.4.1 坐标模式 107 5.4.2 MM_ANISOTROPIC坐标模式 108 5.4.3 MM_ISOTROPIC坐标模式 110 5.4.4 平移坐标 111 5.4.5 修改坐标方向 112 5.5 小结 113 5.6 练习题 114 第6章 用户输入 115 6.1 鼠标和键盘 115 6.1.1 鼠标消息 115 6.1.2 键盘消息 119 6.2 使用菜单 121 6.2.1 编辑菜单 121 6.2.2 处理菜单命令 123 6.2.3 修改菜单状态 125 6.2.4 使用弹出式菜单 127 6.3 小结 129 6.4 练习题 130 第7章 工具栏与状态栏 131 7.1 工具栏 131 7.1.1 编辑工具栏 131 7.1.2 处理工具栏命令 133 7.1.3 工具栏按钮状态 135 7.1.4 自定义工具栏 135 7.2 状态栏 141 7.2.1 默认状态栏 142 7.2.2 操作状态栏 143 7.3 小结 149 7.4 练习题 149 第8章 使用文件 150 8.1 CFile类 150 8.1.1 文件的建立、打开和关闭 150 8.1.2 文件的读、写 152 8.1.3 文件内容的定位与锁定 153 8.1.4 获取、设置文件状态 154 8.2 序列化 156 8.2.1 序列化的概念 156 8.2.2 Serialize函数 156 8.2.3 CArchive类 157 8.2.4 序列化应用实例 159 8.3 文件管理 162 8.3.1 文件操作 162 8.3.2 目录操作 163 8.4 小结 164 8.5 练习题 164 第9章 常用消息 165 9.1 消息的分类 165 9.2 系统消息 165 9.2.1 WM_CREATE 165 9.2.2 WM_CLOSE 166 9.2.3 WM_QUERYENDSEESSION 166 9.2.4 WM_DESTROY 167 9.2.5 WM_NCDESTROY 167 9.2.6 WM_TIMER 167 9.2.7 WM_PAINT 168 9.2.8 程序实例 169 9.3 用户自定义消息 171 9.3.1 消息标识 172 9.3.2 消息映射宏 172 9.3.3 消息发送 172 9.3.4 消息接收 173 9.3.5 使用系统热键消息 174 9.3.6 使用进程间消息 177 9.4 小结 180 9.5 练习题 181 第10章 对话框 182 10.1 概述 182 10.2 对话框模板资源 182 10.2.1 创建对话框模板资源 182 10.2.2 编辑对话框模板属性 183 10.2.3 在对话框模板中添加或删除控件 184 10.2.4 在对话框模板上调整控件 185 10.2.5 修改控件的属性 185 10.2.6 设定控件跳格次序 186 10.2.7 测试对话框模板资源 187 10.3 对话框类 187 10.3.1 模式对话框 188 10.3.2 模式对话框例子 188 10.3.3 非模式对话框 189 10.3.4 非模式对话框例子 189 10.4 自定义对话框 190 10.4.1 建立模板资源 191 10.4.2 建立CDialog派生类 191 10.4.3 为控件添加消息映射 192 10.4.4 为控件添加成员变量 193 10.4.5 使用CDialog派生类对象 194 10.5 基于对话框的MFC程序 194 10.5.1 建立项目 195 10.5.2 对话框程序框架分析 196 10.6 通用对话框 202 10.6.1 CFileDialog 203 10.6.2 CColorDialog 205 10.6.3 CFontDialog 206 10.7 小结 208 10.8 练习题 208 第11章 常用控件 210 11.1 概述 210 11.1.1 控件消息 210 11.1.2 通知消息 210 11.1.3 控件的创建 210 11.2 按钮(BUTTON) 210 11.2.1 按钮样式 211 11.2.2 按钮控件的通知消息 211 11.2.3 在对话框中使用按钮的例子 211 11.3 文本编辑框(EDITBOX) 213 11.3.1 文本编辑框的样式 214 11.3.2 文本编辑框控件的通知消息 214 11.3.3 在对话框中使用编辑框控件 214 11.4 静态控件(STATIC) 216 11.4.1 静态控件的样式 216 11.4.2 静态控件的通知消息 217 11.4.3 在对话框中使用静态控件 217 11.5 复选框 (CHECKBUTTON) 218 11.5.1 复选框的样式 218 11.5.2 复选框的通知消息 219 11.5.3 在对话框中使用复选框 219 11.6 单选按扭 (RADIOBUTTON) 219 11.6.1 单选按钮的样式 219 11.6.2 单选按钮的通知消息 219 11.6.3 在对话框中使用复选框和单选按钮 219 11.7 进程条 (PROGRESS) 221 11.7.1 进程条的样式 221 11.7.2 进程条的成员函数 221 11.7.3 在对话框中使用进程条控件 221 11.8 滑动条 (SLIDER) 222 11.8.1 滑动控件的样式 223 11.8.2 滑动控件的通知消息 223 11.8.3 微调控件的成员函数 223 11.8.4 在对话框中使用滑动条控件 224 11.9 Spin控件 224 11.9.1 微调控件的样式 225 11.9.2 微调控件的通知消息 225 11.9.3 微调控件的成员函数 225 11.9.4 在对话框中使用微调控件 226 11.10 组合框 (ComboBox) 227 11.10.1 组合框的样式 227 11.10.2 组合框的常用通知消息 228 11.10.3 在对话框中使用组合框 228 11.11 小结 229 11.12 练习题 229 第12章 使用树控件和列表控件 231 12.1 图像列表 231 12.1.1 建立图像列表 231 12.1.2 图像列表的操作 232 12.2 树控件 233 12.2.1 概述 233 12.2.2 树控件的创建 234 12.2.3 树控件的操作 238 12.3 列表控件 240 12.3.1 概述 240 12.3.2 列表控件的创建 241 12.3.3 列表控件的操作 245 12.4 小结 248 12.5 练习题 248 第13章 动态链接库 249 13.1 概述 249 13.2 创建标准Win32动态库 249 13.2.1 新建标准Win32动态库项目 250 13.2.2 添加函数 250 13.2.3 添加类 253 13.2.4 导出函数 253 13.2.5 导出自定义类 253 13.2.6 生成DLL 254 13.3 创建标准MFC动态库 254 13.3.1 新建MFC动态库项目 254 13.3.2 添加自定义函数 255 13.3.3 添加自定义类 258 13.3.4 导出自定义函数 258 13.3.5 导出自定义类 258 13.4 在程序中使用动态库 258 13.4.1 加载 DLL的方式 258 13.4.2 使用隐式加载 259 13.4.3 使用显式加载 260 13.5 小结 262 13.6 练习题 262 第14章 使用多任务 264 14.1 进程 264 14.1.1 进程的优先级 264 14.1.2 启动进程 265 14.1.3 进程的管理 267 14.2 线程 274 14.2.1 线程的优先级 275 14.2.2 线程的创建和终止 275 14.2.3 使用工作者线程 276 14.2.4 使用用户接口线程 277 14.3 进程、线程间的同步 279 14.3.1 等待函数 280 14.3.2 使用事件 281 14.3.3 使用临界段 282 14.3.4 使用互斥量 284 14.3.5 使用信号量 285 14.4 小结 287 14.5 练习题 288 附 录 289 附录A Windows窗口样式 289 附录B Windows虚键码表 292 附录C 常用数据结构 294 参考文献 306
MFC 李进九的电子书籍 第1章 MFC概述 1 1.1 MFC是一个编程框架 1 1.1.1 封装 1 1.1.2 继承 2 1.1.3 虚拟函数和动态约束 2 1.1.4 MFC的宏观框架体系 2 1.2 MDI应用程序的构成 3 1.2.1 构成应用程序的对象 3 1.2.2 构成应用程序的对象之间的关系 5 1.2.3 构成应用程序的文件 5 第2章 MFC和Win32 9 2.1 MFC Object和Windows Object的关系 9 2.2 Windows Object 12 2.2.1 Windows的注册 12 2.2.2 MFC窗口类CWnd 15 2.2.3 在MFC下创建一个窗口对象 17 2.2.4 MFC窗口的使用 18 2.2.5 在MFC下窗口的销毁 19 2.3 设备描述表 20 2.3.1 设备描述表概述 20 2.3.2 设备描述表在MFC中的实现 22 2.3.3 MFC设备描述表类的使用 24 2.4 GDI对象 25 第3章 CObject类 28 3.1 CObject的结构 28 3.2 CObject类的特性 30 3.3 实现CObject特性的机制 32 3.3.1 DECLARE_DYNAMIC等宏的定义 32 3.3.2 CruntimeClass类的结构与功能 35 3.3.3 动态类信息、动态创建的原理 38 3.3.4 序列化的机制 39 第4章 消息映射的实现 42 4.1 Windows消息概述 42 4.1.1 消息的分类 42 4.1.2 消息结构和消息处理 42 4.2 消息映射的定义和实现 44 4.2.1 MFC处理的三类消息 44 4.2.2 MFC消息映射的实现方法 45 4.2.3 在声明与实现的内部 46 4.2.3.1 消息映射声明的解释 47 4.2.3.2 消息映射实现的解释 49 4.2.4 消息映射宏的种类 51 4.3 CcmdTarget类 54 4.4 MFC窗口过程 55 4.4.1 MFC窗口过程的指定 56 4.4.2 对Windows消息的接收和处理 58 4.4.2.1 从窗口过程到消息映射 59 4.4.2.2 Windows消息的查找和匹配 60 4.4.2.3 Windows消息处理函数的调用 62 4.4.2.4 消息映射机制完成虚拟函数功能的原理 63 4.4.3 对命令消息的接收和处理 64 4.4.3.1 MFC标准命令消息的发送 64 4.4.3.2 命令消息的派发和消息的多次处理 67 4.4.3.3 一些消息处理类的OnCmdMsg的实现 69 4.4.3.4 一些消息处理类的OnCommand的实现 71 4.4.4 对控制通知消息的接收和处理 72 4.4.4.1 WM_COMMAND控制通知消息的处理 72 4.4.4.2 WM_NOTIFY消息及其处理: 73 4.4.4.3 消息反射 74 4.4.5 对更新命令的接收和处理 77 4.4.5.1 实现方法 77 4.4.5.2 状态更新命令消息 78 4.4.5.3 类CCmdUI 79 4.4.5.4 自动更新用户接口对象状态的机制 80 4.5 消息的预处理 82 4.6 MFC消息映射的回顾 83 第5章 MFC对象的创建 85 5.1 MFC对象的关系 85 5.1.1 创建关系 85 5.1.2 交互作用关系 86 5.2 MFC提供的接口 87 5.2.1 虚拟函数接口 87 5.2.2 消息映射方法和标准命令消息 91 5.3 MFC对象的创建过程 94 5.3.1 应用程序中典型对象的结构 94 5.3.1.1 应用程序类的成员变量 95 5.3.1.2 CDocument的成员变量 97 5.3.1.3 文档模板的属性 97 5.3.2 WinMain入口函数 99 5.3.2.1 WinMain流程 99 5.3.2.2 MFC空闲处理 101 5.3.3 SDI应用程序的对象创建 102 5.3.3.1 文档模板的创建 102 5.3.3.2 文件的创建或者打开 103 5.3.3.3 SDI边框窗口的创建 112 5.3.3.4 视的创建 115 5.3.3.5 窗口初始化 116 5.3.3.6 视的初始化 120 5.3.3.7 激活边框窗口(处理WM_ACTIVE) 121 5.3.3.8 SDI流程的回顾 122 5.3.4 MDI程序的对象创建 123 5.3.4.1 有别于SDI的主窗口加载过程 124 5.3.4.2 MDI子窗口、视、文档的创建 125 5.3.4.3 MDI子窗口的初始化和窗口的激活 127 第6章 应用程序的退出 131 6.1 边框窗口对WM_CLOSE的处理 131 6.2 窗口的销毁过程 135 6.2.1 DestroyWindow 135 6.2.2 处理WM_DESTROY消息 136 6.2.3 处理WM_NCDESTROY消息 136 6.3 SDI窗口、MDI主、子窗口的关闭 137 第7章 MFC的DLL 139 7.1 DLL的背景知识 139 7.2 调用约定 141 7.2.1 MFC的DLL应用程序的类型 142 7.3 DLL的几点说明 143 7.4 输出函数的方法 145 第8章 MFC的进程和线程 148 8.1 Win32的进程和线程概念 148 8.2 Win32的进程处理简介 148 8.2.1 进程的创建 148 8.2.2 进程的终止 149 8.3 Win32的线程 150 8.3.1 线程的创建 150 8.3.2 线程的终止 150 8.3.3 线程局部存储 151 8.4 线程同步 152 8.4.1 同步对象 152 8.4.2 等待函数 153 8.5 MFC的线程处理 154 8.5.1 创建用户界面线程 155 8.5.2 创建工作者线程 155 8.5.3 AfxBeginThread 155 8.5.4 CreateThread和_AfxThreadEntry 157 8.5.5 线程的结束 160 8.5.6 实现线程的消息循环 161 第9章 MFC的状态 163 9.1 模块状态 163 9.2 模块、进程和线程状态的数据结构 164 9.2.1 层次关系 164 9.2.2 CNoTrackObject类 166 9.2.3 AFX_MODULE_STATE类 166 9.2.4 _AFX_BASE_MODULE_STATE 169 9.2.5 _AFX_THREAD_STATE 169 9.2.6 AFX_MODULE_THREAD_STATE 171 9.3 线程局部存储机制和状态的实现 172 9.3.1 CThreadSlotData和_afxThreadData 173 9.3.1.1 CThreadSlotData的定义 173 9.3.1.2 CThreadSlotData的一些数据成员 174 9.3.1.3 _afxThreadData 175 9.3.2 线程状态_afxThreadState 176 9.3.3 进程模块状态afxBaseModuleState 178 9.3.4 状态对象的创建 180 9.3.4.1 状态对象的创建过程 180 9.3.4.2 创建过程所涉及的几个重要函数的算法 183 9.4 管理状态 184 9.4.1 模块状态切换 184 9.4.2 扩展DLL的模块状态 186 9.4.2.1 _AFX_EXTENSION_MODULE 187 9.4.2.2 扩展DLL的初始化函数 188 9.4.3 核心MFC DLL 190 9.4.4 动态链接的规则DLL的模块状态的实现 190 9.5 状态信息的作用 192 9.5.1.1 模块信息的保存和管理 192 9.5.2 MFC资源、运行类信息的查找 193 9.5.3 模块信息的显示 194 9.5.4 模块-线程状态的作用 196 9.5.4.1 只能访问本线程MFC对象的原因 196 9.5.4.2 实现MFC对象和Windows对象之间的映射 196 9.5.4.3 临时对象的处理 199 9.6 状态对象的删除和销毁 199 第10章 内存分配方式和调试机制 202 10.1 M内存分配 202 10.1.1 内存分配函数 202 10.1.2 C++的new 和 delete操作符 204 10.2 调试手段 204 10.2.1 C运行库提供和支持的调试功能 204 10.2.2 MFC提供的调试手段 205 10.2.3 内存诊断 208 第11章 MFC下的文件类 210 11.1 文件操作的方法 210 11.2 MFC的文件类 210 11.2.1 CFile的结构 211 11.2.1.1 CFile定义的枚举类型 211 11.2.1.2 CFile的其他一些成员变量 212 11.2.1.3 CFile的成员函数 212 11.2.2 CFile的部分实现 213 11.2.3 CFile的派生类 215 第12章 对话框和对话框类CDialog 217 12.1 模式和无模式对话框 217 12.1.1 模式对话框 217 12.1.2 无模式对话框 218 12.2 对话框的MFC实现 219 12.2.1 CDialog的设计和实现 219 12.2.1.1 CDialog的成员变量 219 12.2.1.2 CDialog的成员函数: 219 12.2.2 MFC模式对话框的实现 220 12.2.2.1 MFC对话框过程 220 12.2.2.2 模式对话框窗口过程 221 12.2.2.3 使用原对话框窗口过程作消息的缺省处理 225 12.2.2.4 Dialog命令消息和控制通知消息的处理 226 12.2.2.5 消息预处理和Dialog消息 228 12.2.2.6 模式对话框的消息循环 229 12.2.3 对话框的数据交换 233 12.2.3.1 数据交换的方法 233 12.2.3.2 CDataExchange 234 12.2.3.3 数据交换和验证函数 236 12.2.3.4 UpdateData函数 239 12.3 无模式对话框 240 12.3.1 CScrollView 240 12.3.2 CFormView 242 12.3.2.1 CFormView的创建 243 12.3.2.2 CFormView的消息预处理 245 12.3.2.3 CFormView的输入焦点 247 第13章 MFC工具条和状态栏 248 13.1 Windows控制窗口 248 13.2 MFC的工具条和状态栏类 249 13.2.1 控制窗口的创建 251 13.2.1.1 PreCreateWindow 251 13.2.1.2 控制条的窗口创建 253 13.2.2 控制条的销毁 259 13.2.3 处理控制条的位置 259 13.2.3.1 计算控制条位置的过程和算法 259 13.2.3.2 CFrameWnd的虚拟函数RecalcLayout 260 13.2.3.3 CWnd的成员函数RepositionBars 262 13.2.4 工具条、状态栏和边框窗口的接口 265 13.2.4.1 应用程序在状态栏中显示信息 265 13.2.4.2 状态栏显示菜单项的提示信息 268 13.2.4.3 控制条的消息分发处理 270 13.2.4.4 Tooltip 275 13.2.4.5 禁止和允许 279 13.2.4.6 显示或者隐藏工具栏和状态栏 285 13.2.5 泊位和漂浮 286 第14章 SOCKET类的设计和实现 288 14.1 WinSock基本知识 288 14.1.1 WinSock API 288 14.1.2 Socket的使用 290 14.2 MFC对WinSockt API的封装 291 14.2.1 CAsyncSocket 291 14.2.2 socket对象的创建和捆绑 292 14.2.3 异步网络事件的处理 296 14.3 CSocket 297 14.4 CSocketFile 299
第1章 MFC概述 1 1.1 MFC是一个编程框架 1 1.1.1 封装 1 1.1.2 继承 2 1.1.3 虚拟函数和动态约束 2 1.1.4 MFC的宏观框架体系 2 1.2 MDI应用程序的构成 3 1.2.1 构成应用程序的对象 3 1.2.2 构成应用程序的对象之间的关系 5 1.2.3 构成应用程序的文件 5 第2章 MFC和Win32 9 2.1 MFC Object和Windows Object的关系 9 2.2 Windows Object 12 2.2.1 Windows的注册 12 2.2.2 MFC窗口类CWnd 15 2.2.3 在MFC下创建一个窗口对象 17 2.2.4 MFC窗口的使用 18 2.2.5 在MFC下窗口的销毁 19 2.3 设备描述表 20 2.3.1 设备描述表概述 20 2.3.2 设备描述表在MFC中的实现 22 2.3.3 MFC设备描述表类的使用 24 2.4 GDI对象 25 第3章 CObject类 28 3.1 CObject的结构 28 3.2 CObject类的特性 30 3.3 实现CObject特性的机制 32 3.3.1 DECLARE_DYNAMIC等宏的定义 32 3.3.2 CruntimeClass类的结构与功能 35 3.3.3 动态类信息、动态创建的原理 38 3.3.4 序列化的机制 39 第4章 消息映射的实现 42 4.1 Windows消息概述 42 4.1.1 消息的分类 42 4.1.2 消息结构和消息处理 42 4.2 消息映射的定义和实现 44 4.2.1 MFC处理的三类消息 44 4.2.2 MFC消息映射的实现方法 45 4.2.3 在声明与实现的内部 46 4.2.3.1 消息映射声明的解释 47 4.2.3.2 消息映射实现的解释 49 4.2.4 消息映射宏的种类 51 4.3 CcmdTarget类 54 4.4 MFC窗口过程 55 4.4.1 MFC窗口过程的指定 56 4.4.2 对Windows消息的接收和处理 58 4.4.2.1 从窗口过程到消息映射 59 4.4.2.2 Windows消息的查找和匹配 60 4.4.2.3 Windows消息处理函数的调用 62 4.4.2.4 消息映射机制完成虚拟函数功能的原理 63 4.4.3 对命令消息的接收和处理 64 4.4.3.1 MFC标准命令消息的发送 64 4.4.3.2 命令消息的派发和消息的多次处理 67 4.4.3.3 一些消息处理类的OnCmdMsg的实现 69 4.4.3.4 一些消息处理类的OnCommand的实现 71 4.4.4 对控制通知消息的接收和处理 72 4.4.4.1 WM_COMMAND控制通知消息的处理 72 4.4.4.2 WM_NOTIFY消息及其处理: 73 4.4.4.3 消息反射 74 4.4.5 对更新命令的接收和处理 77 4.4.5.1 实现方法 77 4.4.5.2 状态更新命令消息 78 4.4.5.3 类CCmdUI 79 4.4.5.4 自动更新用户接口对象状态的机制 80 4.5 消息的预处理 82 4.6 MFC消息映射的回顾 83 第5章 MFC对象的创建 85 5.1 MFC对象的关系 85 5.1.1 创建关系 85 5.1.2 交互作用关系 86 5.2 MFC提供的接口 87 5.2.1 虚拟函数接口 87 5.2.2 消息映射方法和标准命令消息 91 5.3 MFC对象的创建过程 94 5.3.1 应用程序中典型对象的结构 94 5.3.1.1 应用程序类的成员变量 95 5.3.1.2 CDocument的成员变量 97 5.3.1.3 文档模板的属性 97 5.3.2 WinMain入口函数 99 5.3.2.1 WinMain流程 99 5.3.2.2 MFC空闲处理 101 5.3.3 SDI应用程序的对象创建 102 5.3.3.1 文档模板的创建 102 5.3.3.2 文件的创建或者打开 103 5.3.3.3 SDI边框窗口的创建 112 5.3.3.4 视的创建 115 5.3.3.5 窗口初始化 116 5.3.3.6 视的初始化 120 5.3.3.7 激活边框窗口(处理WM_ACTIVE) 121 5.3.3.8 SDI流程的回顾 122 5.3.4 MDI程序的对象创建 123 5.3.4.1 有别于SDI的主窗口加载过程 124 5.3.4.2 MDI子窗口、视、文档的创建 125 5.3.4.3 MDI子窗口的初始化和窗口的激活 127 第6章 应用程序的退出 131 6.1 边框窗口对WM_CLOSE的处理 131 6.2 窗口的销毁过程 135 6.2.1 DestroyWindow 135 6.2.2 处理WM_DESTROY消息 136 6.2.3 处理WM_NCDESTROY消息 136 6.3 SDI窗口、MDI主、子窗口的关闭 137 第7章 MFC的DLL 139 7.1 DLL的背景知识 139 7.2 调用约定 141 7.2.1 MFC的DLL应用程序的类型 142 7.3 DLL的几点说明 143 7.4 输出函数的方法 145 第8章 MFC的进程和线程 148 8.1 Win32的进程和线程概念 148 8.2 Win32的进程处理简介 148 8.2.1 进程的创建 148 8.2.2 进程的终止 149 8.3 Win32的线程 150 8.3.1 线程的创建 150 8.3.2 线程的终止 150 8.3.3 线程局部存储 151 8.4 线程同步 152 8.4.1 同步对象 152 8.4.2 等待函数 153 8.5 MFC的线程处理 154 8.5.1 创建用户界面线程 155 8.5.2 创建工作者线程 155 8.5.3 AfxBeginThread 155 8.5.4 CreateThread和_AfxThreadEntry 157 8.5.5 线程的结束 160 8.5.6 实现线程的消息循环 161 第9章 MFC的状态 163 9.1 模块状态 163 9.2 模块、进程和线程状态的数据结构 164 9.2.1 层次关系 164 9.2.2 CNoTrackObject类 166 9.2.3 AFX_MODULE_STATE类 166 9.2.4 _AFX_BASE_MODULE_STATE 169 9.2.5 _AFX_THREAD_STATE 169 9.2.6 AFX_MODULE_THREAD_STATE 171 9.3 线程局部存储机制和状态的实现 172 9.3.1 CThreadSlotData和_afxThreadData 173 9.3.1.1 CThreadSlotData的定义 173 9.3.1.2 CThreadSlotData的一些数据成员 174 9.3.1.3 _afxThreadData 175 9.3.2 线程状态_afxThreadState 176 9.3.3 进程模块状态afxBaseModuleState 178 9.3.4 状态对象的创建 180 9.3.4.1 状态对象的创建过程 180 9.3.4.2 创建过程所涉及的几个重要函数的算法 183 9.4 管理状态 184 9.4.1 模块状态切换 184 9.4.2 扩展DLL的模块状态 186 9.4.2.1 _AFX_EXTENSION_MODULE 187 9.4.2.2 扩展DLL的初始化函数 188 9.4.3 核心MFC DLL 190 9.4.4 动态链接的规则DLL的模块状态的实现 190 9.5 状态信息的作用 192 9.5.1.1 模块信息的保存和管理 192 9.5.2 MFC资源、运行类信息的查找 193 9.5.3 模块信息的显示 194 9.5.4 模块-线程状态的作用 196 9.5.4.1 只能访问本线程MFC对象的原因 196 9.5.4.2 实现MFC对象和Windows对象之间的映射 196 9.5.4.3 临时对象的处理 199 9.6 状态对象的删除和销毁 199 第10章 内存分配方式和调试机制 202 10.1 M内存分配 202 10.1.1 内存分配函数 202 10.1.2 C++的new 和 delete操作符 204 10.2 调试手段 204 10.2.1 C运行库提供和支持的调试功能 204 10.2.2 MFC提供的调试手段 205 10.2.3 内存诊断 208 第11章 MFC下的文件类 210 11.1 文件操作的方法 210 11.2 MFC的文件类 210 11.2.1 CFile的结构 211 11.2.1.1 CFile定义的枚举类型 211 11.2.1.2 CFile的其他一些成员变量 212 11.2.1.3 CFile的成员函数 212 11.2.2 CFile的部分实现 213 11.2.3 CFile的派生类 215 第12章 对话框和对话框类CDialog 217 12.1 模式和无模式对话框 217 12.1.1 模式对话框 217 12.1.2 无模式对话框 218 12.2 对话框的MFC实现 219 12.2.1 CDialog的设计和实现 219 12.2.1.1 CDialog的成员变量 219 12.2.1.2 CDialog的成员函数: 219 12.2.2 MFC模式对话框的实现 220 12.2.2.1 MFC对话框过程 220 12.2.2.2 模式对话框窗口过程 221 12.2.2.3 使用原对话框窗口过程作消息的缺省处理 225 12.2.2.4 Dialog命令消息和控制通知消息的处理 226 12.2.2.5 消息预处理和Dialog消息 228 12.2.2.6 模式对话框的消息循环 229 12.2.3 对话框的数据交换 233 12.2.3.1 数据交换的方法 233 12.2.3.2 CDataExchange 234 12.2.3.3 数据交换和验证函数 236 12.2.3.4 UpdateData函数 239 12.3 无模式对话框 240 12.3.1 CScrollView 240 12.3.2 CFormView 242 12.3.2.1 CFormView的创建 243 12.3.2.2 CFormView的消息预处理 245 12.3.2.3 CFormView的输入焦点 247 第13章 MFC工具条和状态栏 248 13.1 Windows控制窗口 248 13.2 MFC的工具条和状态栏类 249 13.2.1 控制窗口的创建 251 13.2.1.1 PreCreateWindow 251 13.2.1.2 控制条的窗口创建 253 13.2.2 控制条的销毁 259 13.2.3 处理控制条的位置 259 13.2.3.1 计算控制条位置的过程和算法 259 13.2.3.2 CFrameWnd的虚拟函数RecalcLayout 260 13.2.3.3 CWnd的成员函数RepositionBars 262 13.2.4 工具条、状态栏和边框窗口的接口 265 13.2.4.1 应用程序在状态栏中显示信息 265 13.2.4.2 状态栏显示菜单项的提示信息 268 13.2.4.3 控制条的消息分发处理 270 13.2.4.4 Tooltip 275 13.2.4.5 禁止和允许 279 13.2.4.6 显示或者隐藏工具栏和状态栏 285 13.2.5 泊位和漂浮 286 第14章 SOCKET类的设计和实现 288 14.1 WinSock基本知识 288 14.1.1 WinSock API 288 14.1.2 Socket的使用 290 14.2 MFC对WinSockt API的封装 291 14.2.1 CAsyncSocket 291 14.2.2 socket对象的创建和捆绑 292 14.2.3 异步网络事件的处理 296 14.3 CSocket 297 14.4 CSocketFile 299

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值