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

📄 c++ builder 程序设计实用教程 - 9_2_1 ole简介 - 张晋 - 17xie.htm

📁 已经消失的不易找到的C++ builder网络教程总结
💻 HTM
📖 第 1 页 / 共 3 页
字号:
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象不需要保存在文件中,所有数据都在应用程序中,这就确保了</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据不会被偶然地删除或修改。不足之处是应用程序的规模因为保存了</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据而增大了。如果用户想保存对嵌入对象的修改,可以把</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">数据存入文件中。</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(</SPAN><SPAN 
lang=EN-US>2</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)链接</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">链接指的是在应用程序中的</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">控件中插入的对象是数据的地址,而不是真正的原始数据。链接对象的数据保存在</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务器程序创建的文件中,而嵌入对象的数据保存在</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">客户应用程序中。虽然用户似乎在客户程序中看到链接的数据,但是实际上它仅仅只是存放指向服务器程序的指针,其实用户看到的仅仅是原始数据的映象。</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">链接对象必须以文件形式保存,只有对</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务器已经创建好的</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象,</SPAN> 
<SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">才能进行</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">链接,链接的</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象文件可被</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应用程序或其他程序进行修改,</SPAN><SPAN 
lang=EN-US>OLE </SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务器和其他</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应用程序也可以访问和修改</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象。对象数据保存在某一处,但可以被多个应用程序访问。</SPAN></P>
<P class=MsoNormalIndent><SPAN class=SpellE><SPAN 
lang=EN-US>CBuilder</SPAN></SPAN><SPAN lang=EN-US> 5</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">应用程序可以得到</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">链接对象文件中的最新数据。当</SPAN><SPAN 
lang=EN-US>OLE </SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象数据被应用程序修改时,这些变化将在所有包含该对象的其他应用程序中体现。</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最后说明几点:</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(</SPAN><SPAN 
lang=EN-US>1</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)迄今为止,已经出现过两种版本的</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">:</SPAN><SPAN 
lang=EN-US>OLE 1.0</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</SPAN><SPAN 
lang=EN-US>OLE 2.0</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。当用户在</SPAN><SPAN 
lang=EN-US>OLE 1.0 </SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务器中激活</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象,服务器程序在前台打开自己的窗体,并获得焦点。</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">窗体失去焦点,存在于单独的窗体之中。</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(</SPAN><SPAN 
lang=EN-US>2</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)</SPAN><SPAN 
lang=EN-US>OLE 2.0</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是</SPAN><SPAN 
lang=EN-US>OLE 1.0</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的发展,当</SPAN><SPAN 
lang=EN-US>OLE 2.0</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">服务器采用“本地”(</SPAN><SPAN 
lang=EN-US>in place</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)激活方式。本地激活意味着服务器菜单与应用程序菜单要进行融合,服务器的状态条更换应用程序状态条,服务器的工具条更换应用程序工具条。</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象在应用程序窗体中进行编辑,但所有过程均由服务器处理。</SPAN></P>
<P class=MsoNormalIndent><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">(</SPAN><SPAN 
lang=EN-US>3</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">)创建</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对象的服务器决定了</SPAN><SPAN 
lang=EN-US>OLE</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的激活方式。如果一个</SPAN><SPAN 
lang=EN-US>OLE 1.0</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的对象在</SPAN><SPAN 
lang=EN-US>OLE 2.0 </SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">编译的应用程序中打开,它将采用</SPAN><SPAN 
lang=EN-US>OLE 1.0</SPAN><SPAN 
style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的方式。</SPAN></P>
<P class=a><SPAN 
style="FONT-FAMILY: 黑体; mso-ascii-font-family: 'Times New Roman'">表</SPAN><SPAN 
lang=EN-US>9-4 <SPAN style="mso-spacerun: yes">&nbsp;</SPAN></SPAN><SPAN 
style="FONT-FAMILY: 黑体; mso-ascii-font-family: 'Times New Roman'">使用链接或嵌入的原则。</SPAN></P>
<TABLE class=MsoNormalTable 
style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; MARGIN-LEFT: 10.65pt; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BORDER-COLLAPSE: collapse; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-bottom-alt: solid green 1.5pt; mso-border-top-alt: solid green 1.5pt; mso-yfti-tbllook: 191; mso-border-insideh: cell-none; mso-border-insidev: cell-none" 
cellSpacing=0 cellPadding=0 border=1>
  <TBODY>
  <TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes">
    <TD 
    style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; WIDTH: 199.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-border-bottom-alt: solid windowtext 1.0pt; mso-border-top-alt: solid windowtext 1.0pt; mso-border-right-alt: solid windowtext .5pt" 
    width=266>
      <P class=MsoNormalIndent style="TEXT-INDENT: 0cm; TEXT-ALIGN: center" 
      align=center><B style="mso-bidi-font-weight: normal"><SPAN 
      style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt">何时使用链接</SPAN></B><B 
      style="mso-bidi-font-weight: normal"><SPAN lang=EN-US 
      style="FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt"><o:p></o:p></SPAN></B></P></TD>
    <TD 
    style="BORDER-RIGHT: medium none; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; WIDTH: 215.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-border-left-alt: solid windowtext .5pt" 
    width=287>
      <P class=MsoNormalIndent style="TEXT-INDENT: 0cm; TEXT-ALIGN: center" 
      align=center><B style="mso-bidi-font-weight: normal"><SPAN 
      style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt">何时使用嵌入</SPAN></B><B 
      style="mso-bidi-font-weight: normal"><SPAN lang=EN-US 
      style="FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt"><o:p></o:p></SPAN></B></P></TD></TR>
  <TR 
  style="HEIGHT: 30pt; mso-yfti-irow: 0; mso-yfti-firstrow: yes; page-break-inside: avoid">
    <TD 
    style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; WIDTH: 199.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext 1.0pt; mso-border-right-alt: solid windowtext .5pt" 
    width=266>
      <P class=MsoNormalIndent style="TEXT-INDENT: 0cm"><SPAN 
      style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt">想要对源对象进行修改及将这些修改反映到其他与源对象链接的应用程序或文本中</SPAN><SPAN 
      lang=EN-US 
      style="FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt"><o:p></o:p></SPAN></P></TD>
    <TD 
    style="BORDER-RIGHT: medium none; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; WIDTH: 215.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; HEIGHT: 30pt; mso-border-bottom-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext 1.0pt; mso-border-left-alt: solid windowtext .5pt" 
    width=287>
      <P class=MsoNormalIndent style="TEXT-INDENT: 0cm"><SPAN 
      style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt">对源对象进行修改,并将这些修改反映在一个特定的应用程序或文本中</SPAN><SPAN 
      lang=EN-US 
      style="FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt"><o:p></o:p></SPAN></P></TD></TR>
  <TR style="mso-yfti-irow: 0; mso-yfti-firstrow: yes">
    <TD 
    style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; WIDTH: 199.5pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-border-bottom-alt: solid windowtext .5pt; mso-border-right-alt: solid windowtext .5pt" 
    width=266>
      <P class=MsoNormalIndent style="TEXT-INDENT: 0cm"><SPAN 
      style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt">源对象可能被多个</SPAN><SPAN 
      lang=EN-US 
      style="FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt">OLE</SPAN><SPAN 
      style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt">应用程序应用程序频繁修改</SPAN><SPAN 
      lang=EN-US 
      style="FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt"><o:p></o:p></SPAN></P></TD>
    <TD 
    style="BORDER-RIGHT: medium none; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; WIDTH: 215.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: windowtext 1pt solid; mso-border-bottom-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt" 
    width=287>
      <P class=MsoNormalIndent style="TEXT-INDENT: 0cm"><SPAN 
      style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 10.0pt">源对象不可能被一个</SPAN><SPAN 
      lang=EN-US 
      style="FONT-SIZE: 9pt; mso-bidi-font-size: 10.0pt">OLE</SPAN><SPAN 

⌨️ 快捷键说明

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