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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ch24.htm

?? 24小時(shí)學(xué)會(huì)vc++
?? HTM
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><HTML><HEAD>	<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">	<META NAME="GENERATOR" Content="Symantec Visual Page Mac 1.1">	<TITLE>Teach Yourself Visual C++&reg; 5 in 24 Hours -- Hour 24 -- Creating ActiveX Controls</TITLE></HEAD><BODY TEXT="#000000" BGCOLOR="#FFFFFF"><H1 ALIGN="CENTER"><IMG SRC="../button/sams.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM"BORDER="0"><BR><FONT COLOR="#000077">Teach Yourself Visual C++&reg; 5 in 24 Hours</FONT></H1><CENTER><P><A HREF="../ch23/ch23.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../apa/apa.htm"><IMGSRC="../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><H1 ALIGN="CENTER"><FONT COLOR="#000077">- Hour 24 -<BR>Creating ActiveX Controls</FONT></H1><P>As discussed in Hour 20, &quot;Using ActiveX Controls,&quot; ActiveX controlsare components that can be used to easily add new functionality to your application.In this hour, you will learn about<UL>	<LI>Some of the internal plumbing that is required for an ActiveX control<BR>	<BR>		<LI>The support provided by MFC for ActiveX control development<BR>	<BR>		<LI>How to test ActiveX controls using tools supplied with Visual C++</UL><P>To help demonstrate these topics, you also will create and test an ActiveX controlthat you can use in your own projects.<H2><FONT COLOR="#000077"><B>What Is an ActiveX Control?</B></FONT></H2><P><FONT COLOR="#000077"><B>New Term:</B></FONT><B> </B>The <I>Component Object Model</I>,or <I>COM</I>, is a specification that defines how software components should cooperatewith each other. ActiveX technologies are all built on top of the COM specification.</P><P><FONT COLOR="#000077"><B>New Term:</B></FONT><B> </B>In COM, an <I>interface</I>is a group of related functions that are implemented together. All interfaces arenamed beginning with <TT>I</TT>, such as <TT>IDataObject</TT>.</P><P>At a minimum, an ActiveX control must be a COM object. This means that an ActiveXcontrol must support <TT>IUnknown</TT>, the interface supported by all COM objects.This allows for a great deal of latitude when deciding how a control is to be implemented;previously, the OLE custom control architecture required support of at least 14 interfaces.<BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Just a Minute:</B></FONT><B> </B>Support for the	<TT>IUnknown</TT> interface is provided automatically when you use MFC and ControlWizard	to build your control. <HR></BLOCKQUOTE><P>Reducing the number of required interfaces allows ActiveX controls to be muchsmaller than the older OLE controls. It also makes it feasible to use ActiveX controlsto implement functionality where the size of the control is an important factor.Web pages can be more intelligent when a control is downloaded and activated to yourbrowser. For example, Microsoft's Internet Explorer has support for downloading ActiveXcontrols from a Web page. Although this opens a lot of exciting functionality, thesize of the control to be downloaded must be kept as small as possible.<H2><FONT COLOR="#000077"><B>ActiveX Control Properties, Events, and Methods</B></FONT></H2><P>Interaction with an ActiveX component takes place via properties, events, andmethods.<UL>	<LI>A <I>property</I> is an attribute associated with the control.<BR>	<BR>		<LI>An <I>event</I> is a notification message passed to the container by the control.<BR>	<BR>		<LI>A <I>method</I> is an exposed function that can be applied to the control via	<TT>IDispatch</TT>.</UL><P>You'll learn about each of these interaction methods in the next few sections.<H3><FONT COLOR="#000077"><B>Properties</B></FONT></H3><P>Properties are exposed by ActiveX controls, as well as by the client where thecontrol is located. There are four basic types of properties:<UL>	<LI><I>Ambient</I> <I>properties</I> are provided to the control by the container.	The control uses these properties in order to &quot;fit in&quot; properly. Commonly	used ambient properties include the container's background color, default font, and	foreground color.<BR>	<BR>		<LI><I>Extended</I> <I>properties</I> are implemented by the container but appear	to be generated by the control. For example, the tab order of various controls in	a container is an extended property.<BR>	<BR>		<LI><I>Stock</I> <I>properties</I> are control properties implemented by the ActiveX	control development kit. Examples of stock properties are the control font, the caption	text, and the foreground and background colors.<BR>	<BR>		<LI><I>Custom</I> <I>properties</I> are control properties that you implement.</UL><H3><FONT COLOR="#000077"><B>Events</B></FONT></H3><P>An event is used to send a notification message to the control's container. Typically,events are used to notify the container when mouse clicks or other events take place.There are two basic types of events:<UL>	<LI><I>Stock events</I> are implemented by the ActiveX control development kit and	are invoked just like a function call, such as <TT>FireError</TT>.<BR>	<BR>		<LI><I>Custom events</I> are implemented by you, although the MFC class library and	ClassWizard handle much of the work for you.</UL><H3><FONT COLOR="#000077"><B>Methods</B></FONT></H3><P><FONT COLOR="#000077"><B>New Term:</B></FONT><B> </B><I>OLE Automation</I>, nowoften referred to as just <I>Automation,</I> is a way of enabling a COM object tobe controlled by another party. Automation is provided through the <TT>IDispatch</TT>interface.</P><P>Automation was originally developed so that interpreted languages such as VisualBasic could control COM objects. Now most ActiveX controls use Automation to allowall sorts of programs--even those built using scripting languages such as JScriptand VBScript--access to the methods of ActiveX controls.<H2><FONT COLOR="#000077"><B>An ActiveX Control Example</B></FONT></H2><P><FONT COLOR="#000077"><B>New Term:</B></FONT><B> </B>S<I>ubclassing</I> is a methodof borrowing functionality from an existing window or control. By subclassing anexisting window or control, you can concentrate on adding only the new features offeredby your control. The control from which the functionality is borrowed is known asthe <I>superclass</I>.</P><P>As an example of creating an ActiveX control, you will now create an ActiveX controlnamed OleEdit that subclasses the existing Windows edit control. The OleEdit controlis similar to the basic Windows edit control, except that it exposes properties thatallow it to accept only numbers, letters, or a combination of both.</P><P>The control works by performing extra processing when the <TT>WM_CHAR</TT> messageis received by the control. Windows sends <TT>WM_CHAR</TT> to notify the edit controlthat the user has pressed a key on the keyboard. Ordinarily, the edit control wouldsimply add the new character to the edit control. When the <TT>WM_CHAR</TT> messageis received by the OleEdit control, it is processed as shown in Figure 24.1.</P><P><A NAME="01"></A><A HREF="01.htm"><B>Figure 24.1.</B></A> <BR><I>Handling <TT>WM_CHAR</TT> in OleEdit.</I></P><P>The property flags <TT>m_fTextAllowed</TT> and <TT>m_fNumbersAllowed</TT> areexposed as properties that can be changed by the OleEdit control's container.<H3><FONT COLOR="#000077"><B>Creating the Project</B></FONT></H3><P>To begin creating the OleEdit control, use the ControlWizard. Using ControlWizardto build a control is very much like using AppWizard to build applications. To startControlWizard and create the OleEdit control, follow these steps:<DL>	<DD>1. Select New from the File menu. The New dialog box is displayed.<BR>	<BR>	2. Select the Projects tab. A list of project types is displayed.<BR>	<BR>	3. To create an ActiveX control, select MFC ActiveX ControlWizard as the project	type.<BR>	<BR>	4. Specify OleEdit as the project name; a default location for your project will	automatically be provided for the location.<BR>	<BR>	5. Make sure the Create New Workspace radio button is selected, and click OK to create	the project.<BR>	<BR>	6. The initial page from the ControlWizard is shown in Figure 24.2. This page enables	you to specify the basic characteristics of the project, such as the number of controls	handled by this server, whether help files should be generated, and so on. Accept	all the default options presented on this page by clicking the Next button.</DL><P><A NAME="02"></A><A HREF="02.htm"><B>Figure 24.2.</B></A> <I><BR>The first page of the ActiveX ControlWizard.</I><DL>	<DD>7. The second ControlWizard page is shown in Figure 24.3. This page lets you	change the names associated with the control and its OLE interfaces, as well as define	properties for the control. There is also a drop-down list that allows a base class	to be specified for the control. Select Edit from the drop-down list to make the	OleEdit control a subclass of the standard edit control.</DL><P><A NAME="03"></A><A HREF="03.htm"><B>Figure 24.3.</B></A> <I><BR>The second page of the ActiveX ControlWizard.</I><DL>	<DD>8. Click the Finish button. As with other ControlWizard projects, a list of the	files to be created is displayed. Click OK, and the skeleton project is created.</DL><H3><FONT COLOR="#000077"><B>MFC Support for ActiveX Controls</B></FONT></H3><P>A set of MFC classes is used as a framework for all ActiveX controls built usingControlWizard. ClassWizard creates three classes that are specific to your project,using these three classes as base classes:<UL>	<LI><TT>COleControlModule</TT> is the class that manages the ActiveX control module.	This class plays a role similar to the <TT>CWinApp</TT> class used in applications	built using AppWizard. For the OleEdit project, the derived class is named <TT>COleEditApp</TT>.<BR>	<BR>		<LI><TT>COleControl</TT> is the base class that represents the actual control window.	This class is derived from <TT>CWnd</TT> and includes extra ActiveX functionality	for communicating with containers. For the OleEdit project, the derived class is	named <TT>CTestCtrl</TT>.<BR>	<BR>		<LI><TT>COlePropertyPage</TT> is the base class used to manage the property page	for the control. For the OleEdit project, the derived class is named <TT>CTestPropPage</TT>.</UL><H3><FONT COLOR="#000077"><B>Drawing the Control</B></FONT></H3><P>All visible OLE controls must be capable of drawing themselves. Even controlsthat aren't visible when active should draw something as an aid during program development.The OleEdit control is visible at runtime, and it should appear to be a standardedit control.<BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>CAUTION:</B></FONT><B> </B>You might think that	because OleEdit is subclassed from the standard edit control, it can draw itself.	Unfortunately, very few controls actually draw themselves properly; the edit control	is not one that handles drawing properly. For most controls, you must be prepared	to handle the drawing yourself. <HR></BLOCKQUOTE><P>When an ActiveX control project is initially created, the control's <TT>OnDraw</TT>

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
777午夜精品免费视频| 亚洲天堂中文字幕| 亚洲天堂中文字幕| 成人午夜精品在线| 在线观看国产精品网站| 日韩欧美区一区二| 亚洲午夜在线电影| 国产精品一二三区在线| 91一区二区三区在线播放| 麻豆一区二区在线| 91亚洲国产成人精品一区二三 | 亚洲精品久久久蜜桃| 91精品国产乱| 中文字幕一区三区| 亚洲一区二区三区四区在线观看| 日本一区二区三级电影在线观看| 久久精品日产第一区二区三区高清版| 久久先锋影音av鲁色资源| 久久久久九九视频| 亚洲人成影院在线观看| 亚洲成a人片在线不卡一二三区| 亚洲午夜三级在线| 麻豆91精品视频| 国产91富婆露脸刺激对白| 国产在线国偷精品产拍免费yy| 成人av电影免费观看| 日韩一级高清毛片| 亚洲日本va午夜在线电影| 丝袜国产日韩另类美女| 粉嫩av亚洲一区二区图片| 欧美午夜电影一区| 26uuu久久天堂性欧美| 成人欧美一区二区三区1314| 奇米影视一区二区三区| bt欧美亚洲午夜电影天堂| 欧美美女激情18p| 麻豆国产精品官网| 成人午夜看片网址| 亚洲精品一区二区精华| 舔着乳尖日韩一区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 久久精品国产99国产精品| 成人av片在线观看| 欧美日韩在线三级| 亚洲精品国产a| 国产成人av一区| 日韩午夜在线影院| 婷婷夜色潮精品综合在线| 94色蜜桃网一区二区三区| 久久色中文字幕| 久久国产精品免费| 9191成人精品久久| 亚洲成人手机在线| 日本精品裸体写真集在线观看| 久久午夜羞羞影院免费观看| 黄一区二区三区| 2021中文字幕一区亚洲| 国产大陆精品国产| 中文字幕一区二区不卡 | 日本最新不卡在线| 欧美日韩情趣电影| 青草av.久久免费一区| 日韩一区二区视频| 国产精品亚洲人在线观看| 欧美一二三在线| 色综合天天综合给合国产| 精品成人在线观看| av在线不卡网| 亚洲制服丝袜一区| 欧美大黄免费观看| 91在线小视频| 亚洲欧美国产77777| 91麻豆精品国产综合久久久久久| 免费人成黄页网站在线一区二区| 日韩欧美国产综合一区 | 欧美日韩在线播放三区四区| 亚洲免费视频成人| 欧美一区二区三区在| 国产精品1区2区3区| 亚洲色欲色欲www在线观看| 欧美精品vⅰdeose4hd| 国产宾馆实践打屁股91| 亚洲国产视频一区| 欧美一级片免费看| 99麻豆久久久国产精品免费优播| 亚洲国产精品一区二区www| 久久综合久久综合亚洲| 99久久精品一区| 精东粉嫩av免费一区二区三区| 中文字幕永久在线不卡| 精品久久久久久久人人人人传媒| 色老汉一区二区三区| 国产美女精品在线| 日韩电影在线观看网站| 久久婷婷久久一区二区三区| 91超碰这里只有精品国产| 成人午夜又粗又硬又大| 精品在线播放免费| 狠狠色丁香久久婷婷综| 国产乱码字幕精品高清av| 亚洲欧美成人一区二区三区| 亚洲美女偷拍久久| 亚洲女人小视频在线观看| 亚洲一区二区三区在线看| 亚洲成人精品一区二区| 日本中文一区二区三区| 久久国产乱子精品免费女| 激情综合网天天干| 成人av在线一区二区| av激情综合网| 色妞www精品视频| 5月丁香婷婷综合| 久久久不卡网国产精品二区| 国产精品妹子av| 中文字幕日韩精品一区| 亚洲成人自拍一区| 蜜桃视频一区二区三区| 成人不卡免费av| 在线精品视频免费观看| 欧美一区二区免费| 日韩理论片网站| 日韩成人dvd| 不卡的看片网站| 欧美日韩精品高清| 久久精品在线观看| 亚洲午夜国产一区99re久久| 久久精品99国产精品日本| 91视频一区二区| 久久久久9999亚洲精品| 狠狠色综合日日| 91网站最新网址| 久久久久久久久久久99999| 亚洲国产三级在线| 成人在线一区二区三区| 67194成人在线观看| 亚洲综合精品自拍| 成人午夜电影小说| 久久综合久久综合亚洲| 美女高潮久久久| 欧美乱妇15p| 一区二区三区日韩| 成人性视频免费网站| 欧美sm美女调教| 青青草精品视频| 欧美喷潮久久久xxxxx| 亚洲精品中文字幕乱码三区| 成人一区二区视频| 国产欧美日韩麻豆91| 国产成人精品www牛牛影视| 日韩欧美电影一区| 玖玖九九国产精品| 欧美一区二区三区系列电影| 亚洲一区免费观看| 91麻豆国产在线观看| 亚洲欧洲国产日本综合| 99精品黄色片免费大全| 亚洲精品视频观看| 欧美午夜精品免费| 毛片基地黄久久久久久天堂| 欧美性欧美巨大黑白大战| 亚洲综合清纯丝袜自拍| 欧美性生活影院| 日韩国产欧美视频| 欧美国产日韩精品免费观看| www.欧美.com| 一区二区三区欧美在线观看| 欧美日韩精品免费| 国产精品一二二区| 一级做a爱片久久| 欧美成人vr18sexvr| 成人一区二区三区在线观看| 亚洲天堂av老司机| 欧美福利一区二区| 成人国产亚洲欧美成人综合网| 亚洲综合色噜噜狠狠| 久久综合九色综合97_久久久| 不卡的av网站| 一区二区三区在线不卡| 日韩欧美成人激情| 91日韩在线专区| 国产美女精品一区二区三区| 一区二区三区四区激情| 亚洲精品在线观看网站| 9人人澡人人爽人人精品| 蜜桃久久久久久| 一区二区三区成人在线视频| 久久日韩精品一区二区五区| 宅男在线国产精品| 91麻豆文化传媒在线观看| 蜜桃av噜噜一区二区三区小说| 最新成人av在线| 国产欧美视频一区二区三区| 欧美日韩免费不卡视频一区二区三区 | 久久久久久久久久久久电影| 欧美日韩一区二区三区四区五区| 国产激情精品久久久第一区二区| 蜜臀va亚洲va欧美va天堂| 亚洲夂夂婷婷色拍ww47| 国产精品国产自产拍在线| 精品精品国产高清a毛片牛牛 |