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

📄 right10-1.htm

📁 Visual C++面向对象程序设计教程(配套习题资源)
💻 HTM
字号:
<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"> 第 1 节 </span>&gt;<span style="background-color: #CCFF99"> 
10.1 资源及资源编辑器</span></p>              
<hr color="#008000" size="1">

<p style="line-height: 100%; text-indent: 0; margin: 0" align="left" class="右标题"><font FACE="??ì?,SimSun" LANG="ZH-CN" size="2">因为资源和程序代码是独立开发的,维护好程序中的资源也就为程序的开发打下了良好的基础。</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 FACE="oúì?,SimHei" LANG="ZH-CN" size="2">1. 
资源和资源特点</font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 5"><font size="2">Windows<font FACE="??ì?,SimSun" LANG="ZH-CN">应用程序包括众多图形元素,例如图标、光标、菜单、对话框等,每一个这样的元素都作为一种可以装入应用程序的资源来存放。</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 5"><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">在</font>Windows<font FACE="??ì?,SimSun" LANG="ZH-CN">程序设计中,各种资源的描述放在资源文件中,资源文件中的代码描述各种资源的显示效果。</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 0; margin-bottom: 5"><font FACE="??ì?,SimSun" LANG="ZH-CN" size="2">资源的描述和程序代码是分开的,这样做有两个好处:一方面,多个应用程序可以引用一个资源的定义;另一方面,程序设计人员可以在不影响程序代码的情况下修改资源。</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 FACE="oúì?,SimHei" LANG="ZH-CN" size="2">2. 
资源的分类</font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"></font><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">在</font>Windows<font FACE="??ì?,SimSun" LANG="ZH-CN">中资源有以下几类:</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 5; margin-bottom: 0"><font size="2">(1) 
<font FACE="??ì?,SimSun" LANG="ZH-CN">加速键(</font>Accelerator<font FACE="??ì?,SimSun" LANG="ZH-CN">)列表</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 5; margin-bottom: 0"><font size="2">(2) 
<font FACE="??ì?,SimSun" LANG="ZH-CN">位图(</font>Bitmap<font FACE="??ì?,SimSun" LANG="ZH-CN">)</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 5; margin-bottom: 0"><font size="2">(3) 
<font FACE="??ì?,SimSun" LANG="ZH-CN">光标(</font>Cursor<font FACE="??ì?,SimSun" LANG="ZH-CN">)</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 5; margin-bottom: 0"><font size="2">(4) 
<font FACE="??ì?,SimSun" LANG="ZH-CN">对话框(</font>Dialog<font FACE="??ì?,SimSun" LANG="ZH-CN">)</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 5; margin-bottom: 0"><font size="2">(5) 
<font FACE="??ì?,SimSun" LANG="ZH-CN">图标(</font>Icon<font FACE="??ì?,SimSun" LANG="ZH-CN">)</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 5; margin-bottom: 0"><font size="2">(6) 
<font FACE="??ì?,SimSun" LANG="ZH-CN">菜单(</font>Menu<font FACE="??ì?,SimSun" LANG="ZH-CN">)</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 5; margin-bottom: 0"><font size="2">(7) 
<font FACE="??ì?,SimSun" LANG="ZH-CN">字符串列表(</font>String Table<font FACE="??ì?,SimSun" LANG="ZH-CN">)</font></font></p>
<p ALIGN="justify" style="line-height: 100%; margin-top: 5; margin-bottom: 0"><font size="2">(8) 
<font FACE="??ì?,SimSun" LANG="ZH-CN">版本信息(</font>Version<font FACE="??ì?,SimSun" 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">3. 
</font><font FACE="??ì?,SimSun" LANG="ZH-CN"><font size="2">资源编辑器</font></p>
</font>
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">Windows<font FACE="??ì?,SimSun" LANG="ZH-CN">所有的资源都可以在资源编辑器中编辑,包括修改、定制等。<font color="#FF6600">建议</font></font><font color="#FF6600">Windows<font FACE="??ì?,SimSun" LANG="ZH-CN">资源的编辑放在资源编辑器中,</font>Visual 
C++<font FACE="??ì?,SimSun" LANG="ZH-CN">中包含多种资源编辑器,不同的资源使用不同的资源编辑器。</font></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">4. 
</font><font FACE="??ì?,SimSun" LANG="ZH-CN"><font size="2">资源的公共编辑方法</font></p>
</font><font SIZE="3">
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"></font><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">在</font>Visual 
C++<font FACE="??ì?,SimSun" LANG="ZH-CN">集成开发环境中,所有的资源编辑器的使用是相似的。也就是说,只要掌握了一种资源的编辑方法,那么,其他资源的编辑问题就迎刃而解了。</font></font></p>
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">(1) 
<font FACE="??ì?,SimSun" LANG="ZH-CN">资源的创建</font></font></p>
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font FACE="oúì?,SimHei" LANG="ZH-CN" size="2">(2) 
资源的打开</font></p>
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font FACE="oúì?,SimHei" LANG="ZH-CN" size="2">(3) 
资源文件(.rc)的保存</font></p>
<p style="line-height: 100%; text-indent: 0; margin: 0" align="left" class="右标题"> </p>

<hr size="1" color="#008000">
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0">&nbsp;&nbsp; <span style="position: absolute; left: 33; top: 641"><a href="right9-5.htm" target="_self"><img border="0" src="rightd1.gif" width="113" height="70"></a></span>&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;&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;&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;&nbsp; <span style="position: absolute; left: 484; top: 642"><a href="right10-2.htm" target="_self"><img border="0" src="rightd2.gif" width="124" height="63"></a></span></p>            

</body>

</html>

⌨️ 快捷键说明

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