right10-2.htm

来自「Visual C++面向对象程序设计教程(配套习题资源)」· HTM 代码 · 共 286 行 · 第 1/2 页

HTM
286
字号
<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>第 10 章</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">第 10 章</span><span style="background-color: #CCFF99">&nbsp;                                    
</span>&gt;<span style="background-color: #CCFF99"> 第 2 节 </span>&gt;<span style="background-color: #CCFF99">  
 10.2 资源标识符</span></p>                
<hr color="#008000" size="1">

<font SIZE="3">
<p ALIGN="JUSTIFY" class="右标题" style="line-height: 100%; margin-top: 0; margin-bottom: 0"></font><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">在</font>VC<font FACE="??ì?,SimSun" LANG="ZH-CN">中,源程序引用资源是通过标识符来进行的,而且每一个标识符都有一个整数与之对应,整数值是唯一的。</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 10; margin-bottom: 0"><font FACE="oúì?,SimHei" LANG="ZH-CN" size="2">1.   
资源标识符</font></p>
<font SIZE="3">
<p ALIGN="justify" style="line-height: 150%; margin-top: 0; margin-bottom: 0"></font><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">所谓标识符是指映射到整数上的一串字符。</font></font></p>
<p ALIGN="justify" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">资源标识符的命名规则和其他标识符相同,但是要注意,资源标识符不区分大小写字母,字符个数不得超过</font>247<font FACE="??ì?,SimSun" LANG="ZH-CN">个。</font></font></p>
<p ALIGN="justify" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">每当用户创建一个新的资源或资源对象时系统都会为其提供缺省名称并赋值,该定义保存在</font>Resource.h<font FACE="??ì?,SimSun" LANG="ZH-CN">文件中。</font></font></p>
<p ALIGN="justify" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">一般情况下,不同的资源使用不同的资源标识符前缀。</font></font></p>
<p ALIGN="justify" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">&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;&nbsp; 
表</font>10-1<font FACE="??ì?,SimSun" LANG="ZH-CN"> 
资源标识符定义的常用前缀。</font></font></p>  
<table border="1" cellspacing="0" cellpadding="0" style="border-collapse:collapse;
 border:none;mso-border-alt:solid windowtext .5pt;mso-padding-alt:0cm 5.4pt 0cm 5.4pt" bgcolor="#CCFFCC">
  <tr>
    <td width="136" valign="top" style="width:101.65pt;border-top:solid windowtext .75pt;
  border-left:none;border-bottom:solid windowtext .5pt;border-right:solid windowtext .5pt;
  padding:0cm 5.4pt 0cm 5.4pt">
      <p class="MsoHeading8" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">类别<span lang="EN-US"><o:p>
      </o:p>
      </span></font></p>
    </td>
    <td width="170" valign="top" style="width:127.4pt;border-top:solid windowtext .75pt;
  border-left:none;border-bottom:solid windowtext .5pt;border-right:solid windowtext .5pt;
  mso-border-left-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
      <p class="MsoHeading8" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">资源符号前缀<span lang="EN-US"><o:p>
      </o:p>
      </span></font></p>
    </td>
    <td width="270" valign="top" style="width:202.35pt;border-top:solid windowtext .75pt;
  border-left:none;border-bottom:solid windowtext .5pt;border-right:none;
  mso-border-left-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
      <p class="MsoHeading8" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">代表的资源或对象<span lang="EN-US"><o:p>
      </o:p>
      </span></font></p>
    </td>
  </tr>
  <tr>
    <td width="136" style="width:101.65pt;border-top:none;border-left:none;
  border-bottom:solid windowtext .5pt;border-right:solid windowtext .5pt;
  mso-border-top-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">资源</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
      </o:p>
      </span></font></p>
    </td>
    <td width="170" valign="top" style="width:127.4pt;border-top:none;border-left:
  none;border-bottom:solid windowtext .5pt;border-right:solid windowtext .5pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  padding:0cm 5.4pt 0cm 5.4pt">
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">IDR_<o:p>
      </o:p>  
      </font></span></p>
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">IDD_<o:p>
      </o:p>
      </font></span></p>
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">IDC_<o:p>
      </o:p>
      </font></span></p>
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">IDI_<o:p>
      </o:p>
      </font></span></p>
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">IDB_<o:p>
      </o:p>
      </font></span></p>
    </td>
    <td width="270" valign="top" style="width:202.35pt;border:none;border-bottom:
  solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:
  solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">加速键或菜单及相关资源</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
      </o:p>
      </span></font></p>
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">对话框资源</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
      </o:p>
      </span></font></p>
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">光标资源</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
      </o:p>
      </span></font></p>
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">图标资源</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
      </o:p>
      </span></font></p>
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">位图资源</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
      </o:p>
      </span></font></p>
    </td>
  </tr>
  <tr>
    <td width="136" style="width:101.65pt;border-top:none;border-left:none;
  border-bottom:solid windowtext .5pt;border-right:solid windowtext .5pt;
  mso-border-top-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">菜单项命令控制</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
      </o:p>
      </span></font></p>
    </td>
    <td width="170" valign="top" style="width:127.4pt;border-top:none;border-left:
  none;border-bottom:solid windowtext .5pt;border-right:solid windowtext .5pt;
  mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
  padding:0cm 5.4pt 0cm 5.4pt">
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">IDM_<o:p>
      </o:p>  
      </font></span></p>
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">ID_<o:p>
      </o:p>
      </font></span></p>
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><font size="2">IDC_<o:p>
      </o:p>
      </font></span></p>
    </td>
    <td width="270" valign="top" style="width:202.35pt;border:none;border-bottom:
  solid windowtext .5pt;mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:
  solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">菜单项</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>
      </o:p>
      </span></font></p>
      <p class="MsoNormal" style="line-height: 100%; mso-line-height-rule: exactly; margin-top: 0; margin-bottom: 0"><font size="2"><span style="mso-bidi-font-size: 10.0pt; font-family: 宋体; mso-ascii-font-family: Times New Roman; mso-hansi-font-family: Times New Roman">命令项</span><span lang="EN-US" style="mso-bidi-font-size: 10.0pt"><o:p>

⌨️ 快捷键说明

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