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

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

?? ch24.htm

?? 24小時學會vc++
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>COleEditCtrl</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>COleEditCtrl</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>WM_CHAR</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>OnChar</TT></TD>	</TR></TABLE></P><P>The source code for the <TT>COleEditCtrl::OnChar</TT> function is provided inListing 24.5.<H4><FONT COLOR="#000077">TYPE: Listing 24.5. Handling the WM_CHAR message in COleEditCtrl::OnChar.</FONT></H4><PRE><FONT COLOR="#0066FF"><TT>void COleEditCtrl::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)</TT><TT>{</TT><TT>    if(_istdigit(nChar) )</TT><TT>    {</TT><TT>        if( m_fNumbersAllowed == FALSE )</TT><TT>        {</TT><TT>            FireError( CTL_E_INVALIDPROPERTYVALUE,</TT><TT>                      _T(&quot;Numbers not allowed&quot;) );</TT><TT>        }</TT><TT>        else</TT><TT>        {</TT><TT>            COleControl::OnChar(nChar, nRepCnt, nFlags);</TT><TT>        }</TT><TT>    }</TT><TT>    else if( _istalpha(nChar) )</TT><TT>    {</TT><TT>        if( m_fTextAllowed == FALSE )</TT><TT>        {</TT><TT>            FireError( CTL_E_INVALIDPROPERTYVALUE,</TT><TT>                      _T(&quot;Characters not allowed&quot;) );</TT><TT>        }</TT><TT>        else</TT><TT>        {</TT><TT>            COleControl::OnChar(nChar, nRepCnt, nFlags);</TT><TT>        }</TT><TT>    }</TT><TT>    else</TT><TT>        COleControl::OnChar (nChar, nRepCnt, nFlags);</TT><TT>}</TT></FONT></PRE><P>The <TT>OnChar</TT> handler tests for valid characters based on the property flags<TT>m_fTextAllowed</TT> and <TT>m_fNumbersAllowed</TT>. Valid characters are passedto <TT>COleControl::OnChar</TT>, the base class handler for <TT>WM_CHAR</TT>. Ifan invalid character is detected, an <TT>Error</TT> event is fired to the control'scontainer.<H3><FONT COLOR="#000077"><B>Modifying the Control's Bitmap</B></FONT></H3><P>When an ActiveX control is used in a tool such as Developer Studio, Visual Basic,or the ActiveX control test container, a bitmap associated with the control is displayedto the user. In Developer Studio, the bitmap is added to the control palette usedto design dialog box resources. In the test container, a toolbar button displayingthe bitmap is added to the container's toolbar.</P><P>Open the <TT>IDB_OLEEDIT</TT> bitmap resource and edit the bitmap image as shownin Figure 24.5. Save the bitmap and compile the OleEdit project.</P><P><A NAME="05"></A><A HREF="05.htm"><B>Figure 24.5.</B> </A><BR><I>The <TT>IDB_OLEEDIT</TT> bitmap resource.</I><BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Time Saver:</B></FONT><B> </B>To ensure that the	text fits properly in the bitmap, use a regular (non-bold) 8-point Arial font. <HR></BLOCKQUOTE><P>Build the OleEdit project. As part of the build process, the control will be registeredwith the operating system. In the next section, you will learn how to test your control.<H2><FONT COLOR="#000077"><B>Testing an ActiveX Control</B></FONT></H2><P>After following the steps in the previous sections, you are in possession of anOleEdit ActiveX control. However, because the control is a component rather thanan executable program, it can't be run as an EXE. Testing an ActiveX control requiresa few extra steps, which are discussed in this section.<H3><FONT COLOR="#000077"><B>Choosing a Test Container for Your Control</B></FONT></H3><P>Every ActiveX control requires a control container. The simplest control containeris the ActiveX control test container included with Developer Studio and the Win32SDK. Other ActiveX control containers include Microsoft Access and Visual Basic 5.0.In this section, you will test the OleEdit control with <TT>TSTCON32.EXE</TT>, thetest container included with Developer Studio.<H3><FONT COLOR="#000077"><B>Using the TSTCON32 Test Container</B></FONT></H3><P>In order to launch the OleEdit control in the Developer Studio debugger, you mustspecify the application to be used to load the control. You can do this by followingthese steps:<DL>	<DD>1. Select Settings from the Project menu in Developer Studio. The Project Setting	dialog box is displayed.<BR>	<BR>	2. Click the Debug tab.<BR>	<BR>	3. A small button with a right-arrow icon is located next to the Executable for Debug	Session edit control. Click this button and choose ActiveX Control Test Container	from the menu that is displayed.<BR>	<BR>	4. Click OK to dismiss the dialog box and save your changes.</DL><P>After you have made these changes, you can use the Developer Studio debugger tolaunch the test container. Click the Go icon in the toolbar or otherwise start adebug session to display the test container, as shown in Figure 24.6.<BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Just a Minute:</B></FONT><B> </B>You can also launch	the ActiveX control test container by selecting its menu item from the Tools menu.	This doesn't start your control inside the Visual C++ debugger. <HR></BLOCKQUOTE><P><A NAME="06"></A><A HREF="06.htm"><B>Figure 24.6.</B></A> <I><BR>The ActiveX control test container.</I></P><P>When an ActiveX control created by ControlWizard is compiled, the control is automaticallyregistered. To display a list of all registered controls, select Insert OLE Control...from the Edit menu. A dialog box containing all available ActiveX controls is displayed.Select the OleEdit edit control, and click OK. The OleEdit control is inserted intothe test container, as shown in Figure 24.7. Note that an OleEdit icon is also addedto the test container toolbar.</P><P><A NAME="07"></A><A HREF="07.htm"><B>Figure 24.7.</B> </A><I><BR>The ActiveX control test container and OleEdit control.</I><H3><FONT COLOR="#000077"><B>Testing Properties</B></FONT></H3><P>You can use the test container to test your control's properties in two ways:<UL>	<LI>Through an Automation interface that lists all exposed properties<BR>	<BR>		<LI>Through your control's property sheet</UL><P>To access all the properties implemented by an ActiveX control, select Propertiesfrom the View menu. A Properties dialog box is displayed, as shown in Figure 24.8.</P><P><A NAME="08"></A><A HREF="08.htm"><B>Figure 24.8.</B> </A><I><BR>Accessing the properties exposed by OleEdit.</I></P><P>To display the list of properties exposed by the control, click the drop-downlist. Every property can be accessed and changed through the control's property sheet.To change a particular property's value, select the property name from the drop-downlist, set the property value, and click Apply.</P><P>A slightly easier way to use the interface is provided through the control's propertysheet. You can use the test container to invoke the control's property sheet by selectingProperties from the Edit menu. The property sheet for OleEdit is shown in Figure24.9.</P><P><A NAME="09"></A><A HREF="09.htm"><B>Figure 24.9.</B> </A><BR><I>The property sheet used by OleEdit.</I><H2><FONT COLOR="#000077"><B>Summary</B></FONT></H2><P>In this hour you learned how to create and test ActiveX controls. ActiveX controlsare smaller and simpler versions of OLE custom controls. Developer Studio helps tosimplify the task of creating an ActiveX control. ControlWizard is very similar toAppWizard and guides you through the steps required to create a skeleton versionof your control.<H2><FONT COLOR="#000077"><B>Q&amp;A</B></FONT></H2><DL>	<DD><B>Q If I test my ActiveX control in the test container, is it reasonable to	assume that it will work in all control containers?</B><BR>	<BR>	<B>A</B> You might think so, but in reality you should test your control in as many	containers as you can find. The test container is very useful for performing basic	tests on your control. You should also test your control in whatever environment	it will be used. For example, if your control will be used in Visual Basic programs,	you should test your control using VB as a container.<BR>	<BR>	<B>Q Why does ControlWizard offer the Invisible at Runtime option? What use is an	invisible control?</B><BR>	<BR>	<B>A</B> There actually are a large number of controls that don't have a need for	a user interface. For example, an ActiveX control that performs protocol conversion	for data communications might never be presented to the user; it can just perform	work for its container. By offering this option, the control is easier to develop	because the control doesn't need to handle user-interface issues. The control is	also easier to use because it will hide itself automatically.</DL><H2><FONT COLOR="#000077"><B>Workshop</B></FONT></H2><P>The Workshop is designed to help you anticipate possible questions, review whatyou've learned, and begin thinking ahead to putting your knowledge into practice.The answers to the quiz are in Appendix B, &quot;Quiz Answers.&quot;<H3><FONT COLOR="#000077"><B>Quiz</B></FONT></H3><DL>	<DD>1. What is an ActiveX interface?<BR>	<BR>	2. What interface must be supported by an ActiveX control?<BR>	<BR>	3. What are some examples of ActiveX control containers?<BR>	<BR>	4. What four types of properties are supported by an ActiveX control?<BR>	<BR>	5. What are the two types of events generated by ActiveX controls?<BR>	<BR>	6. What macros are used to transfer data to and from property pages in an ActiveX	control?<BR>	<BR>	7. What MFC base classes provide support for ActiveX controls?<BR>	<BR>	8. What type of properties are supplied to the ActiveX control by its container?<BR>	<BR>	9. What is subclassing?<BR>	<BR>	10. What function is called by an ActiveX control to request that the subclassed	control repaint itself?</DL><H3><FONT COLOR="#000077"><B>Exercises</B></FONT></H3><DL>	<DD>1. Change the OleEdit project so that hexadecimal numbers can be entered when	the Numbers Only flag is set.<BR>	<BR>	2. Change the OleEdit project so that only letters, numbers, and backspaces can be	entered into the control.</DL><CENTER><P><HR><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> <BR><BR><BR><IMG SRC="../button/corp.gif" WIDTH="284" HEIGHT="45" ALIGN="BOTTOM" ALT="Macmillan Computer Publishing USA"BORDER="0"></P><P>&copy; <A HREF="../copy.htm">Copyright</A>, Macmillan Computer Publishing. Allrights reserved.</CENTER></BODY></HTML>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲性图库| 国产成人av一区二区三区在线| 亚洲国产精品99久久久久久久久| 日韩欧美成人激情| 日韩视频免费直播| 欧美一级二级在线观看| 91精品国产综合久久精品| 欧美高清视频www夜色资源网| 欧美色精品天天在线观看视频| 欧美亚洲国产一区在线观看网站 | 蜜桃在线一区二区三区| 视频一区免费在线观看| 丝袜美腿一区二区三区| 麻豆精品一二三| 国产主播一区二区| 菠萝蜜视频在线观看一区| 91免费在线播放| 欧美性xxxxxxxx| 欧美一区二区三区婷婷月色 | 亚洲综合色网站| 亚洲永久免费av| 香蕉加勒比综合久久| 亚洲成人黄色小说| 久久国产精品第一页| 国产乱码精品一区二区三区忘忧草| 国产一区欧美日韩| 成人av在线一区二区三区| 色综合久久中文字幕| 欧美日韩国产123区| 日韩一区二区在线看| 久久精品亚洲精品国产欧美 | 亚洲日本乱码在线观看| 一个色综合av| 美女网站在线免费欧美精品| 国产高清久久久| 日本韩国一区二区三区| 91精品在线免费观看| 精品粉嫩aⅴ一区二区三区四区| 久久精品视频在线看| 亚洲精品国久久99热| 蜜桃久久av一区| www.欧美亚洲| 91精品久久久久久蜜臀| 日本一区二区三区电影| 青青草原综合久久大伊人精品 | 亚洲国产高清不卡| 亚洲国产日韩av| 国产老妇另类xxxxx| 色狠狠综合天天综合综合| 日韩欧美一卡二卡| 亚洲日本在线a| 极品少妇xxxx偷拍精品少妇| 色94色欧美sute亚洲线路二| 欧美日韩视频专区在线播放| 久久精品视频一区| 爽好多水快深点欧美视频| 丁香激情综合国产| 欧美日本韩国一区| 最新日韩av在线| 美女视频第一区二区三区免费观看网站| 粉嫩aⅴ一区二区三区四区| 欧美日本韩国一区二区三区视频| 国产精品免费视频网站| 麻豆精品久久精品色综合| 色妹子一区二区| 久久久久97国产精华液好用吗| 亚洲大尺度视频在线观看| 成人精品免费视频| 欧美成人在线直播| 亚洲bt欧美bt精品| 色噜噜狠狠色综合中国 | 韩国精品主播一区二区在线观看 | 精品国产免费人成电影在线观看四季 | 久久―日本道色综合久久| 亚洲精品视频在线看| 成人福利视频网站| www国产精品av| 天堂va蜜桃一区二区三区| 日本韩国一区二区三区视频| 国产精品美日韩| 国产精品亚洲第一区在线暖暖韩国 | 国产精品主播直播| 91麻豆精品国产91久久久久久久久| 久久久天堂av| 久久精品国产第一区二区三区| 欧美三级视频在线观看| 亚洲裸体在线观看| 成人午夜视频网站| 久久久久久毛片| 精品一二线国产| 欧美一二区视频| 午夜欧美大尺度福利影院在线看| 91福利社在线观看| 国产精品久久久久一区二区三区 | 粉嫩高潮美女一区二区三区| 日韩一区二区三区电影| 日韩在线卡一卡二| 在线成人免费观看| 亚洲丶国产丶欧美一区二区三区| 久久嫩草精品久久久精品| 蜜臀国产一区二区三区在线播放 | 久久久综合精品| 国产乱码字幕精品高清av | 精品美女一区二区| 青草国产精品久久久久久| 5566中文字幕一区二区电影| 亚洲妇女屁股眼交7| 欧美丝袜丝交足nylons| 亚洲欧美日韩国产手机在线 | 88在线观看91蜜桃国自产| 三级欧美在线一区| 91精品欧美综合在线观看最新| 亚洲成国产人片在线观看| 欧美亚洲一区二区三区四区| 亚洲第一狼人社区| 777亚洲妇女| 国产一区二区不卡在线| 国产亚洲成av人在线观看导航| 国产成人综合视频| 国产精品毛片高清在线完整版| 91色porny在线视频| 亚洲免费在线观看视频| 欧美伊人久久久久久午夜久久久久| 亚洲小说欧美激情另类| 欧美三级电影网站| 捆绑变态av一区二区三区| 久久品道一品道久久精品| 成人禁用看黄a在线| 亚洲一区二区三区在线看| 欧美理论电影在线| 人人超碰91尤物精品国产| 精品91自产拍在线观看一区| 国产99久久久国产精品潘金| 亚洲女爱视频在线| 91麻豆精品国产91久久久| 国产综合色产在线精品| 国产精品你懂的| 欧美午夜精品一区二区蜜桃| 日韩高清电影一区| 亚洲国产精品二十页| 在线观看视频欧美| 久久99久久精品| 国产精品国产三级国产a| 欧美乱妇15p| 国产成人鲁色资源国产91色综 | 不卡区在线中文字幕| 亚洲国产wwwccc36天堂| 久久理论电影网| 欧美亚洲一区二区三区四区| 久久精品99久久久| 中文字幕亚洲一区二区av在线| 欧美日韩国产精品自在自线| 国产在线播放一区| 一个色妞综合视频在线观看| 欧美精品一区二区在线观看| 99视频精品全部免费在线| 日韩电影在线免费观看| 国产精品久久久久久久蜜臀| 在线综合+亚洲+欧美中文字幕| 成a人片亚洲日本久久| 婷婷六月综合亚洲| 中文字幕一区在线观看视频| 日韩一区二区精品葵司在线| 色播五月激情综合网| 久久成人麻豆午夜电影| 一区二区不卡在线播放| 久久精品视频免费| 91麻豆精品国产| 在线欧美日韩国产| 国产福利不卡视频| 日本少妇一区二区| 亚洲精品欧美综合四区| 国产日产欧美一区二区视频| 337p亚洲精品色噜噜噜| 一本大道久久a久久精二百| 国产一区二区三区| 视频一区二区国产| 亚洲激情第一区| 日本一区二区成人在线| 精品欧美一区二区在线观看| 欧美视频日韩视频在线观看| 成人午夜碰碰视频| 国产在线一区二区| 麻豆91免费看| 亚洲成人免费视| 亚洲激情成人在线| 亚洲三级久久久| 亚洲欧美在线视频| xvideos.蜜桃一区二区| 精品久久国产老人久久综合| 欧美日韩电影一区| 精品婷婷伊人一区三区三| 一本大道久久精品懂色aⅴ| eeuss鲁片一区二区三区| 国产电影精品久久禁18| 国产综合成人久久大片91| 精品一区二区三区蜜桃| 日韩av电影一区| 美国毛片一区二区| 奇米一区二区三区av|