亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ch20.htm

?? Learning language of Visual C++6
?? HTM
?? 第 1 頁 / 共 4 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>

<HEAD>
<SCRIPT LANGUAGE="JavaScript">

<!--

function popUp(pPage) {
 var fullURL = document.location;
 var textURL = fullURL.toString();
 var URLlen = textURL.length;
 var lenMinusPage = textURL.lastIndexOf("/");
 lenMinusPage += 1;
 var fullPath = textURL.substring(0,lenMinusPage);
 popUpWin = window.open('','popWin','resizable=yes,scrollbars=no,width=525,height=394');
 figDoc= popUpWin.document;
 zhtm= '<HTML><HEAD><TITLE>' + pPage + '</TITLE>';
 zhtm += '<link rel="stylesheet" href="/includes/stylesheets/ebooks.css"></head>';
 zhtm += '<BODY bgcolor="#FFFFFF">';
 zhtm += '<IMG SRC="' + fullPath + pPage + '">';
 zhtm += '<P><B>' + pPage + '</B>';
 zhtm += '</BODY></HTML>';
 window.popUpWin.document.write(zhtm);
 window.popUpWin.document.close();
 // Johnny Jackson 4/28/98
 }

//-->
                                                                
</SCRIPT>
<link rel="stylesheet" href="/includes/stylesheets/ebooks.css">

	
	<TITLE>Special Edition Using Visual C++ 6 -- Ch 20 -- Building an Internet ActiveX Control</TITLE>
</HEAD>

<BODY TEXT="#000000" BGCOLOR="#FFFFFF">

<CENTER>
<H1><IMG SRC="../button/que.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM" BORDER="0"><BR>
Special Edition Using Visual C++ 6</H1>
</CENTER>
<CENTER>
<P><A HREF="../ch19/ch19.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"
ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch21/ch21.htm"><IMG
SRC="../button/next.gif" WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Next chapter"
BORDER="0"></A><A HREF="../index.htm"><IMG SRC="../button/contents.gif" WIDTH="128"
HEIGHT="28" ALIGN="BOTTOM" ALT="Contents" BORDER="0"></A> 
<HR>

</CENTER>
<CENTER>
<H1>- 20 -</H1>
</CENTER>
<CENTER>
<H1>Building an Internet ActiveX Control</H1>
</CENTER>

<UL>
	<LI><A HREF="#Heading1">Embedding an ActiveX Control in a Microsoft Internet Explorer
	Web Page</A>
	<LI><A HREF="#Heading2">Embedding an ActiveX Control in a Netscape Navigator Web
	Page</A>
	<LI><A HREF="#Heading3">Registering as Safe for Scripting and Initializing</A>
	<LI><A HREF="#Heading4">Choosing Between ActiveX and Java Applets</A>
	<LI><A HREF="#Heading5">Using AppWizard to Create Faster ActiveX Controls</A>
	<LI><A HREF="#Heading6">Speeding Control Loads with Asynchronous Properties</A>
	<UL>
		<LI><A HREF="#Heading7">Properties</A>
		<LI><A HREF="#Heading8">Using BLOBs</A>
		<LI><A HREF="#Heading9">Changing Dieroll</A>
		<LI><A HREF="#Heading10">Testing and Debugging Dieroll</A>
	</UL>
</UL>

<P>
<HR SIZE="4">

<CENTER>
<H1></H1>
</CENTER>
<H2><A NAME="Heading1"></A>Embedding an ActiveX Control in a Microsoft Internet Explorer
Web Page</H2>
<P>In Chapter 17, &quot;Building an ActiveX Control,&quot; you learned how to build
your own controls and include them in forms-based applications written in Visual
Basic, Visual C++, and the VBA macro language. There's one other place those controls
can go--on a Web page. However, the ActiveX controls generated by older versions
of Visual C++ were too big and slow to put on a Web page. This chapter shows you
how to place these controls on your Web pages and how to write faster, sleeker controls
that will make your pages a pleasure to use.</P>
<P>It's a remarkably simple matter to put an ActiveX control on a Web page that you
know will be loaded by Microsoft Internet Explorer 3.0 or later. You use the &lt;OBJECT&gt;
tag, a relatively new addition to HTML that describes a wide variety of objects that
you might want to insert in a Web page: a moving video clip, a sound, a Java applet,
an ActiveX control, and many more kinds of information and ways of interacting with
a user. Listing 20.1 shows the HTML source for a page that displays the Dieroll control
from Chapter 17.</P>
<P>
<H4>Listing 20.1&#160;&#160;fatdie.html--Using &lt;OBJECT&gt;</H4>
<PRE>&lt;HEAD&gt;
&lt;TITLE&gt;A Web page with a rolling die&lt;/TITLE&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;OBJECT ID=&quot;Dieroll1&quot;
CLASSID=&quot;CLSID:46646B43-EA16-11CF-870C-00201801DDD6&quot;
CODEBASE=&quot;dieroll.cab#Version=1,0,0,1&quot;
WIDTH=&quot;200&quot;
HEIGHT=&quot;200&quot;&gt;
&lt;PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;0&quot;&gt;
&lt;PARAM NAME=&quot;BackColor&quot; VALUE=&quot;16777215&quot;&gt;
If you see this text, your browser does not support the OBJECT tag.
&lt;BR&gt;
&lt;/OBJECT&gt;
&lt;BR&gt;
Here is some text after the die
&lt;/BODY&gt;
</PRE>
<PRE>&lt;/HTML&gt;
</PRE>
<P>The only ugly thing here is the CLSID, and the easiest way to get that, because
you're a software developer, is to cut and paste it from dieroll.odl, the Object
Description Library. Open the dieroll project you built in Chapter 17 and use FileView
to open dieroll.odl quickly. Here's the section in dieroll.odl that includes the
CLSID:</P>
<P>
<PRE>    //  Class information for CDierollCtrl
    [ uuid(46646B43-EA16-11CF-870C-00201801DDD6),
      helpstring(&quot;Dieroll Control&quot;), control ]
</PRE>
<P>This section is at the end of dieroll.odl--the earlier CLSIDs do not refer to
the whole control, only to portions of it. Copy the uuid from inside the brackets
into your HTML source.</P>


<BLOCKQUOTE>
	<P>
<HR>
<STRONG>TIP:</STRONG> Microsoft has a product called the <I>Control</I> <I>Pad</I>
	that gets CLSIDs from the Registry for you and makes life easier for Web page builders
	who are either intimidated by instructions like &quot;open the ODL file&quot; or
	don't have the ODL file because it's not shipped with the control. Because you're
	building this control and know how to open files in Developer Studio, this chapter
	will not describe the Control Pad tool. If you're curious, see Microsoft's Control
	Pad Web page at <A HREF="http://www.microsoft.com/workshop/author/cpad/"><B>http://www.microsoft.com/workshop/author/cpad/</B></A>
	for more details. 
<HR>


</BLOCKQUOTE>

<P>The CODEBASE attribute of the OBJECT tag specifies where the OCX file is kept,
so if the user doesn't have a copy of the ActiveX control, one will be downloaded
automatically. The use of the CLSID means that if this user has already installed
this ActiveX control, there is no download time; the control is used immediately.
You can simply specify an URL to the OCX file, but to automate the DLL downloading,
this CODEBASE attribute points to a CAB file. Putting your control in a CAB file
will cut your download time by nearly half. You can learn more about CAB technology
at <A HREF="http://www.microsoft.com/intdev/cab/"><B>http://www.microsoft.com/intdev/cab/</B></A>.
That page is written for Java developers, but the technology works just as well to
cut the download time for ActiveX controls.</P>


<BLOCKQUOTE>
	<P>
<HR>
<STRONG>TIP:</STRONG> If you don't have access to a Web server in which to put controls
	while you're developing them, use a <B>file://</B> URL in the CODEBASE attribute
	that points to the control's location on your hard drive. 
<HR>


</BLOCKQUOTE>

<P>The remaining OBJECT tag attributes will be intuitive if you've built a Web page
before: ID is used by other tags on the page to refer to this control; WIDTH and
HEIGHT specify the size, in pixels, of the control's appearance; and HSPACE and VSPACE
are horizontal and vertical blank spaces, in pixels, around the entire control.</P>
<P>Everything after the &lt;OBJECT ...&gt; tag and before the &lt;/OBJECT&gt; tag
is ignored by browsers that understand the OBJECT tag. (The &lt;OBJECT...&gt; tag
is usually many lines long and contains all the information to describe the object.)
Browsers that don't understand the OBJECT tag ignore the &lt;OBJECT ...&gt; tag and
the &lt;/OBJECT&gt; tag and display the HTML between them (in this case, a line of
text pointing out that this browser doesn't support the tag). This is part of the
specification for a Web browser: It should ignore tags it doesn't understand.</P>
<P>Figure 20.1 shows this page displayed in Microsoft Explorer 3.0. Clicking the
die rolls it, and everything works beautifully. Things certainly look simple and
amazing, but two flaws appear immediately:</P>

<UL>
	<LI>Not all browsers support the OBJECT tag.
	<P>
	<LI>It can take a long time to download the control.
</UL>

<P><A HREF="javascript:popUp('20uvc01.gif')"><B>FIG. 20.1</B></A><B> </B><I>Microsoft
Internet Explorer can show ActiveX controls.</I></P>
<P>Figure 20.2 shows the same page displayed in Netscape Navigator 3.0. It doesn't
support the OBJECT tag, so it doesn't show the die. Also, Netscape Navigator is used
by more than half the people who browse the Web! Does that mean it's not worth writing
ActiveX controls for Web pages? Not at all. As you'll see in the very next section,
there's a way that Navigator users can use the same controls as Explorer users.</P>
<P><A HREF="javascript:popUp('20uvc02.gif')"><B>FIG. 20.2</B></A><B> </B><I>Netscape
Navigator can't show ActiveX controls.</I></P>
<P>The size issue is a bigger worry. The release version of the Dieroll control,
as built for Chapter 17, is 26KB. Many designers put a 50KB limit per Web page for
graphics and other material to be downloaded, and this simple control uses half that
limit. A more powerful control would easily exceed it. The majority of this chapter
deals with ways to reduce that size or otherwise minimize the download time for ActiveX
controls. Web page designers can then tap the controls' full power without worrying
that users will label their pages as slow, one of the worst knocks against any Web
site.</P>
<P>There's a third flaw that you won't notice because you have Visual C++ installed
on your computer. The control requires the MFC DLL. The user must download it and
install it before the controls can run. The mechanism that automatically downloads
and installs controls doesn't automatically download and install this DLL, though
using a CAB file as discussed earlier can make it possible.</P>


<BLOCKQUOTE>
	<P>
<HR>
<STRONG>TIP:</STRONG> For an example of a Web page that includes a CAB file for the
	Dieroll control and the MFC DLLs, come to <A HREF="http://www.gregcons.com/dieroll.htm"><B>http://www.gregcons.com/dieroll.htm</B></A>.
	
<HR>
<BR>
	
<HR>
<STRONG>NOTE:</STRONG> It might occur to you to try linking the MFC Library statically
	into your control. It seems easy enough to do: Choose Project, Settings, and on the
	General tab there is a drop-down list box inviting you to choose static linking.
	If you do that and build, you'll get hundreds of linker errors: The COleControl and
	CPropPage functions are not in the DLL that is linked statically. (That's because
	Microsoft felt it would be foolish to link the MFC functions statically in a control.)
	Setting up another library to link in those functions is beyond the scope of this
	chapter, especially because all this work would lead to an enormous (more than 1MB)
	control that would take far too long to download the first time.&#160; 
<HR>


</BLOCKQUOTE>

<H2><A NAME="Heading2"></A>Embedding an ActiveX Control in a Netscape Navigator Web
Page</H2>
<P>NCompass Labs (<A HREF="http://www.ncompasslabs.com"><B>www.ncompasslabs.com</B></A>)
has produced a Netscape plug-in, called ScriptActive, that enables you to embed an
ActiveX control in a page to be read with Netscape Navigator. The HTML for the page
must be changed, as shown in Listing 20.2. (Resist the temptation to get the plug-in
and load this HTML into Netscape yourself until you have registered the control as
safe for initializing and scripting in the next section.)</P>


<BLOCKQUOTE>
	<P>
<HR>
<STRONG>TIP:</STRONG> You can download a demonstration version of the plug-in for
	a free 30-day trial from the NCompass Labs Web site. 
<HR>


</BLOCKQUOTE>

<H4>Listing 20.2&#160;&#160;fatdie2.html--Using &lt;OBJECT&gt; and &lt;EMBED&gt;</H4>
<PRE>&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;A Web page with a rolling die&lt;/TITLE&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;OBJECT ID=&quot;Dieroll1&quot;
CLASSID=&quot;CLSID:46646B43-EA16-11CF-870C-00201801DDD6&quot;
CODEBASE=&quot;dieroll.cab#Version=1,0,0,1&quot;
WIDTH=&quot;200&quot;
HEIGHT=&quot;200&quot;&gt;
&lt;PARAM NAME=&quot;ForeColor&quot; VALUE=&quot;0&quot;&gt;
&lt;PARAM NAME=&quot;BackColor&quot; VALUE=&quot;16777215&quot;&gt;
&lt;PARAM NAME=&quot;Image&quot; VALUE=&quot;beans.bmp&quot;&gt;
&lt;EMBED LIVECONNECT NAME=&quot;Dieroll1&quot;
WIDTH=&quot;200&quot;
HEIGHT=&quot;200&quot;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷成人激情在线网| 欧美最新大片在线看 | 亚洲3atv精品一区二区三区| 久久99国内精品| 欧美主播一区二区三区| 久久精品一二三| 三级欧美韩日大片在线看| av电影在线观看不卡| 久久先锋资源网| 三级欧美在线一区| 欧美亚洲国产一区二区三区va| 国产精品护士白丝一区av| 九九视频精品免费| 制服丝袜在线91| 亚洲亚洲精品在线观看| 色综合久久久网| 国产精品理伦片| 成人永久aaa| 国产农村妇女精品| 国产成人自拍网| 久久精品欧美日韩| 国产一区在线视频| 国产亚洲欧美一级| 国产精品一区二区x88av| 日韩午夜电影在线观看| 视频在线观看91| 日韩免费高清电影| 日本不卡一二三| 日韩欧美一区二区免费| 日本成人在线网站| 欧美大胆人体bbbb| 久久疯狂做爰流白浆xx| 久久免费看少妇高潮| 高清国产一区二区| 国产精品女主播av| 91免费观看在线| 一区二区三区精品视频| 欧美综合一区二区| 偷拍日韩校园综合在线| 日韩无一区二区| 国产精品一二三在| 亚洲欧美色一区| 91.com视频| 黑人精品欧美一区二区蜜桃| 久久免费视频色| 99久久精品国产毛片| 亚洲图片一区二区| 日韩三级在线观看| 粉嫩一区二区三区性色av| 中文字幕在线不卡| 欧美日韩一区中文字幕| 青青草精品视频| 国产三级欧美三级| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 成人午夜电影久久影院| 亚洲男帅同性gay1069| 欧美老女人第四色| 国产精品一卡二| 亚洲精品国产成人久久av盗摄| 欧美日韩国产综合视频在线观看| 全国精品久久少妇| 国产精品看片你懂得| 777xxx欧美| av一区二区三区在线| 日韩成人免费在线| 国产精品三级视频| 91精品国产免费久久综合| 高清在线成人网| 日韩国产高清在线| 国产精品女上位| 日韩网站在线看片你懂的| 成人黄色777网| 日韩电影在线一区| 亚洲视频一区二区在线观看| 欧美肥妇bbw| 91最新地址在线播放| 蜜臀精品一区二区三区在线观看 | 日韩中文字幕区一区有砖一区| 久久综合成人精品亚洲另类欧美| 欧美主播一区二区三区| 国产 日韩 欧美大片| 蜜桃视频一区二区三区| 一区二区三区加勒比av| 国产亚洲精品bt天堂精选| 337p亚洲精品色噜噜狠狠| 在线这里只有精品| gogogo免费视频观看亚洲一| 久久精品久久99精品久久| 亚洲成国产人片在线观看| 亚洲视频一区在线| 国产精品国产a级| 久久精品欧美日韩| 久久男人中文字幕资源站| 日韩精品在线看片z| 欧美精品久久99久久在免费线| 99国产欧美久久久精品| 国产69精品久久99不卡| 国产精品 欧美精品| 国产一区二区不卡| 国产伦精品一区二区三区免费| 热久久一区二区| 日韩av电影免费观看高清完整版| 夜夜爽夜夜爽精品视频| 亚洲欧美日韩精品久久久久| 国产精品国产三级国产aⅴ无密码| 欧美激情一区在线| 久久精品一区二区三区不卡牛牛| 欧美mv日韩mv国产网站| 精品日韩欧美一区二区| 91精品啪在线观看国产60岁| 欧美精品在线视频| 日韩一区二区三区观看| 欧美一级欧美一级在线播放| 91精品国产一区二区三区香蕉| 在线观看免费成人| 欧美日韩综合不卡| 欧美人妇做爰xxxⅹ性高电影| 欧美日韩一区在线观看| 欧美乱妇23p| 欧美一级淫片007| 久久综合久久综合九色| 久久精品视频一区二区三区| 国产精品毛片无遮挡高清| 专区另类欧美日韩| 一区二区高清视频在线观看| 亚洲777理论| 韩国精品一区二区| 成人高清免费在线播放| 在线观看日韩电影| 日韩欧美国产小视频| 久久九九久精品国产免费直播| 国产精品丝袜91| 亚洲最新视频在线观看| 亚洲成人激情社区| 韩国精品主播一区二区在线观看 | 国产欧美日韩三级| 一区视频在线播放| 亚洲成av人**亚洲成av**| 久99久精品视频免费观看| 欧美日韩精品一区视频| 日韩欧美国产精品| 中文字幕欧美激情一区| 亚洲一区二区不卡免费| 日本中文字幕不卡| 成人精品视频.| 欧美人伦禁忌dvd放荡欲情| 国产午夜精品理论片a级大结局| 亚洲图片你懂的| 免费观看30秒视频久久| 成人91在线观看| 在线电影欧美成精品| 中文无字幕一区二区三区| 一区二区三区视频在线看| 久久爱www久久做| 在线视频国内自拍亚洲视频| 26uuu另类欧美亚洲曰本| 一区二区欧美视频| 国产福利91精品一区二区三区| 日本韩国一区二区三区视频| 亚洲精品一区二区三区精华液| 日韩理论片一区二区| 狠狠色丁香久久婷婷综合_中| 色综合天天综合色综合av| 久久人人爽爽爽人久久久| 亚洲一区二区三区四区在线| 国产精品一区二区三区网站| 欧美人妇做爰xxxⅹ性高电影| 中文字幕亚洲成人| 激情五月激情综合网| 欧美电影影音先锋| 亚洲人123区| 岛国一区二区在线观看| 欧美一二三四在线| 亚洲午夜激情av| 在线免费观看日本欧美| 国产精品麻豆久久久| 国产伦精品一区二区三区在线观看| 在线欧美小视频| 国产精品日日摸夜夜摸av| 麻豆精品一区二区三区| 欧美另类videos死尸| 亚洲综合精品自拍| 91免费看视频| 亚洲欧美成aⅴ人在线观看| 成人黄色大片在线观看| 欧美激情一区不卡| 丁香天五香天堂综合| wwwwww.欧美系列| 麻豆一区二区在线| 日韩专区在线视频| 97久久精品人人澡人人爽| 2020国产精品自拍| 久久爱www久久做| 欧美成人一区二区三区片免费| 午夜亚洲福利老司机| 欧美熟乱第一页| 亚洲bt欧美bt精品777| 欧美日韩成人高清| 日韩精品1区2区3区| 91精品婷婷国产综合久久竹菊|