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

📄 right10-5.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"> 第 </span><span style="background-color: #CCFF99">5 
节 </span>&gt;<span style="background-color: #CCFF99">  10.5  
图形编辑器的使用</span></p>                
<hr color="#008000" size="1">

<p ALIGN="left" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2"><font LANG="ZH-CN">使用图形编辑器用户可以编辑位图、</font>GIF<font LANG="ZH-CN">图像、</font>JPEG<font LANG="ZH-CN">图像、图标、光标以及工具栏等。</font></font></p>

<p ALIGN="left" 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">1.  
<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>Windows<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">(1)  
图形编辑器的外观特性</font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"></font><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><font LANG="ZH-CN">打开图形编辑器时,在</font>VC<font LANG="ZH-CN">的开发环境中将出现一个“</font>Image<font LANG="ZH-CN">”菜单。</font></font></p>
<p ALIGN="CENTER" 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 LANG="ZH-CN" size="2">(2)  
图形编辑器外观的定制</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"><font LANG="ZH-CN">②</font> 
<font LANG="ZH-CN">图形编辑器颜色的设置</font></font></p> 
<blockquote>
  <p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2">VC<font LANG="ZH-CN">调色板中有</font>16<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> 
  <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>Image<font LANG="ZH-CN">”菜单下的“</font>Adjust  
  Color<font LANG="ZH-CN">”命令,屏幕出现如图</font>10-13<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>Image<font LANG="ZH-CN">”菜单下的“</font>Save  
  Palette<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>Image<font LANG="ZH-CN">”菜单下的“</font>Load  
  Palette<font LANG="ZH-CN">”命令将已有的调色板装入。</font></font></p>
</blockquote>
<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="CENTER" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.5pt;mso-bidi-font-size:
10.0pt;font-family:&quot;Times New Roman&quot;;mso-fareast-font-family:宋体;mso-font-kerning:
10.5pt;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN;mso-bidi-language:
AR-SA"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600"
 o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f"
 stroked="f">
 <v:stroke joinstyle="miter"/>
 <v:formulas>
  <v:f eqn="if lineDrawn pixelLineWidth 0"/>
  <v:f eqn="sum @0 1 0"/>
  <v:f eqn="sum 0 0 @1"/>
  <v:f eqn="prod @2 1 2"/>
  <v:f eqn="prod @3 21600 pixelWidth"/>
  <v:f eqn="prod @3 21600 pixelHeight"/>
  <v:f eqn="sum @0 0 1"/>
  <v:f eqn="prod @6 1 2"/>
  <v:f eqn="prod @7 21600 pixelWidth"/>
  <v:f eqn="sum @8 21600 0"/>
  <v:f eqn="prod @7 21600 pixelHeight"/>
  <v:f eqn="sum @10 21600 0"/>
 </v:formulas>
 <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
 <o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:128.25pt;
 height:169.5pt'>
 <v:imagedata src="file:///C:/DOCUME~1/y/LOCALS~1/Temp/msoclip1/01/clip_image001.png"
  o:title=""/>
</v:shape><![endif]-->
<img src="right129.jpg" v:shapes="_x0000_i1025" width="171" height="226"></span><font size="2"> &nbsp;</font></p>
<p ALIGN="CENTER" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2"><font LANG="ZH-CN">图</font>10-13  
<font LANG="ZH-CN">定制颜色选择器</font>&nbsp;</font><font SIZE="1"></p>
</font>
<p ALIGN="justify" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font LANG="ZH-CN" size="2">(3)  
图形资源属性的设置</font></p>
<font SIZE="3">
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"></font><font 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 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">(1)  
创建一个新的图标或光标</font></p>
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="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">(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 size="2">3.  
<font LANG="ZH-CN">编辑工具栏</font></font></p>
<p ALIGN="justify" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font LANG="ZH-CN" size="2">(1)  
创建一个新的工具栏资源</font></p>
<p ALIGN="JUSTIFY" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2"><font LANG="ZH-CN">创建一个新的工具栏资源的方法类似于位图、图标等资源的创建方法。</font> &nbsp;</font></p>
<p ALIGN="justify" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font 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 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> 
<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>Image<font LANG="ZH-CN">”菜单中选择工具栏编辑器,系统弹出“</font>New  
Toolbar Resource<font LANG="ZH-CN">”对话框,如图</font>10-19<font LANG="ZH-CN">所示,改变每个按钮的宽度和高度,单击“</font>OK<font LANG="ZH-CN">”。此时系统将一个大的位图分隔成多个按钮。每个按钮都有自己的</font>ID<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>ID<font LANG="ZH-CN">、宽度和高度。</font></font></p> 
<p ALIGN="justify" style="line-height: 150%; margin-top: 0; margin-bottom: 0"><font LANG="ZH-CN" size="2">(3)  
工具栏按钮的创建、移动和删除操作</font></p>
<p ALIGN="center" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><span lang="EN-US" style="font-size:10.5pt;mso-bidi-font-size:
10.0pt;font-family:&quot;Times New Roman&quot;;mso-fareast-font-family:宋体;mso-font-kerning:
10.5pt;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN;mso-bidi-language:
AR-SA"><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600"
 o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f"
 stroked="f">
 <v:stroke joinstyle="miter"/>
 <v:formulas>
  <v:f eqn="if lineDrawn pixelLineWidth 0"/>
  <v:f eqn="sum @0 1 0"/>
  <v:f eqn="sum 0 0 @1"/>
  <v:f eqn="prod @2 1 2"/>
  <v:f eqn="prod @3 21600 pixelWidth"/>
  <v:f eqn="prod @3 21600 pixelHeight"/>
  <v:f eqn="sum @0 0 1"/>
  <v:f eqn="prod @6 1 2"/>
  <v:f eqn="prod @7 21600 pixelWidth"/>
  <v:f eqn="sum @8 21600 0"/>
  <v:f eqn="prod @7 21600 pixelHeight"/>
  <v:f eqn="sum @10 21600 0"/>
 </v:formulas>
 <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
 <o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:141.75pt;
 height:83.25pt'>
 <v:imagedata src="file:///C:/DOCUME~1/y/LOCALS~1/Temp/msoclip1/01/clip_image001.png"
  o:title=""/>
</v:shape><![endif]-->
<img src="right130.jpg" v:shapes="_x0000_i1025" width="189" height="111"></span></p>
<p ALIGN="center" style="line-height: 100%; margin-top: 0; margin-bottom: 0"><font size="2"><font FACE="??ì?,SimSun" LANG="ZH-CN">图</font>10-19  
New Toolbar Resource<font FACE="??ì?,SimSun" LANG="ZH-CN">对话框</font></font></p> 

<hr size="1" color="#008000">
<p style="line-height: 100%; margin-top: 0; margin-bottom: 0"> </p>            

<p style="line-height: 100%; margin-top: 0; margin-bottom: 0">&nbsp;&nbsp; <span style="position: absolute; left: 32; top: 1194"><a href="right10-4.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: 505; top: 1198"><a href="right10-6.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 + -