⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 right15-2.htm

📁 Visual C++面向对象程序设计教程(配套习题资源)
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>第 15 章</title>
<base target="rbottom">
<style>
<!--
.右标题   { font-size: 10pt; color: #000080; text-indent: 0; margin: 0 }
.右内容   { font-size: 10pt; text-align: left; text-indent: 0; line-height: 100%; margin: 
               0 }
-->
</style>
</head>

<body>

<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"> </p>
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"><span style="position: absolute; left: 4; top: -8"><img border="0" src="1.gif" width="63" height="70"></span></p>
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p style="line-height: 100%; text-indent: 0; margin: 0" class="右标题" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                                                       
&nbsp;&nbsp;&nbsp; <span style="background-color: #CCFF99">第 15 章</span><span style="background-color: #CCFF99">&nbsp;                                              
</span>&gt;<span style="background-color: #CCFF99"> 第 5 节 </span>&gt;<span style="background-color: #CCFF99"> 
15.2 MFC类库的组成和主要类的介绍</span></p>                 
<hr color="#008000" size="1">

<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">1.MFC中的类的组织结构</font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">MFC<font LANG="ZH-CN">中的类按功能来分可划分为以下几类:</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">(1)  
<font LANG="ZH-CN">基类</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">(2)  
<font LANG="ZH-CN">应用程序框架类</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2"><font LANG="ZH-CN">包括:应用程序类、命令相关类、文档</font>/<font LANG="ZH-CN">视类、框架窗口类、文档模板类等。</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">(3)  
<font LANG="ZH-CN">可视对象类</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font LANG="ZH-CN" size="2">包括:窗口类、视类、对话框类、控件类、控件条类等。</font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">(4)  
<font LANG="ZH-CN">绘图类</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font LANG="ZH-CN" size="2">包括:设备描述表类、绘图工具类等。</font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">(5)  
<font LANG="ZH-CN">简单数据类型类</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">(6)  
<font LANG="ZH-CN">通用类</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font LANG="ZH-CN" size="2">包括:数组类、类表类、映像类。</font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">(7)  
<font LANG="ZH-CN">文件和数据库类</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2"><font LANG="ZH-CN">包括:文件</font>I/O<font LANG="ZH-CN">类、</font>ODBC<font LANG="ZH-CN">类、</font>DAO<font LANG="ZH-CN">类等。</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">(8)  
Internet<font LANG="ZH-CN">和网络工作类</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2"><font LANG="ZH-CN">包括:</font>ISAPI<font LANG="ZH-CN">类、</font>Windows  
Socket<font LANG="ZH-CN">类、</font>Win32 Internet<font LANG="ZH-CN">类等。</font></font></p> 
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">(9)  
OLE<font LANG="ZH-CN">类</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">(10)  
<font LANG="ZH-CN">调试和异常类</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font LANG="ZH-CN" size="2">包括:调试支持类、异常类等。</font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2"><font LANG="ZH-CN">详细情况可以参看</font>MSDN<font LANG="ZH-CN">的类层次图(</font>Hierarchy  
Chart<font LANG="ZH-CN">)。</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"> </p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">2.  
<font LANG="ZH-CN">宏和全局函数</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font LANG="ZH-CN" size="2">若一个函数或变量不是某个类的成员,那么它是一个全局函数或变量。</font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2"><font LANG="ZH-CN">全局函数以“</font>Afx<font LANG="ZH-CN">”为前缀,所有全局变量也都是以“</font>afx<font LANG="ZH-CN">”为前缀,宏不带任何特别前缀,但是全部大写。全局函数和变量可以在任何地方、被任何</font>MFC<font LANG="ZH-CN">应用程序中调用。</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font lang="ZH-CN" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font size="2"><font LANG="ZH-CN">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
表</font>15-1<font lang="ZH-CN"> </font>MFC<font LANG="ZH-CN">中的部分全局函数</font></font></p>
<table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; border-style: none; border-width: medium" width="611" bgcolor="#CCFFCC">
  <tr>
    <td width="92" valign="top" style="border-left-style: none; border-left-width: medium; border-right: .5pt solid windowtext; border-top: .75pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0cm; padding-bottom: 0cm" align="center">
      <p class="MsoHeading8"><font size="2">函数名<span lang="EN-US"><o:p>
      </o:p>
      </span></font></p>
    </td>
    <td width="143" valign="top" style="mso-border-left-alt: solid windowtext .5pt; border-left-style: none; border-left-width: medium; border-right: 1.5pt double windowtext; border-top: .75pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0cm; padding-bottom: 0cm" align="center">
      <p class="MsoHeading8"><font size="2">&nbsp;功能<span lang="EN-US"><o:p>
      </o:p>
      </span></font></p>
    </td>
    <td width="121" valign="top" style="mso-border-left-alt: double windowtext 1.5pt; border-left-style: none; border-left-width: medium; border-right: .5pt solid windowtext; border-top: .75pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0cm; padding-bottom: 0cm" align="center">
      <p class="MsoHeading8"><font size="2">&nbsp;函数名<span lang="EN-US"><o:p>
      </o:p>
      </span></font></p>
    </td>
    <td width="194" valign="top" style="mso-border-left-alt: solid windowtext .5pt; border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-top: .75pt solid windowtext; border-bottom: .5pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0cm; padding-bottom: 0cm" align="center">
      <p class="MsoHeading8"><font size="2">功能<span lang="EN-US"><o:p>
      </o:p>
      </span></font></p>
    </td>
  </tr>
  <tr>
    <td width="92" valign="top" style="mso-border-top-alt: solid windowtext .5pt; border-left-style: none; border-left-width: medium; border-right: .5pt solid windowtext; border-top-style: none; border-top-width: medium; border-bottom: .5pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0cm; padding-bottom: 0cm">
      <p class="MsoNormal"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">Afxbort<o:p>
      </o:p> 
      </font></span></p>
    </td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -