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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? apf.htm

?? 21天學(xué)會(huì)VC的英文版
?? HTM
?? 第 1 頁 / 共 5 頁
字號(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"><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 += '</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">	<META NAME="GENERATOR" Content="Symantec Visual Page Mac 1.1.1">	<TITLE>Teach Yourself Visual C++ 6 in 21 Days -- Appendix F -- Using MFC's Helper Classes</TITLE></HEAD><BODY TEXT="#000000" BGCOLOR="#FFFFFF"><H1 ALIGN="CENTER"><IMG SRC="../button/sams.gif" WIDTH="171" HEIGHT="66" ALIGN="BOTTOM"BORDER="0"><BR>Teach Yourself Visual C++ 6 in 21 Days</H1><CENTER><P><A HREF="../ape/ape.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../index.htm"><IMGSRC="../button/contents.gif" WIDTH="128" HEIGHT="28" ALIGN="BOTTOM" ALT="Contents"BORDER="0"></A> <HR></CENTER><H1 ALIGN="CENTER">- F -<BR>Using MFC's Helper Classes</H1><H1></H1><UL>	<LI><A HREF="#Heading1">Using the Collection Classes</A>	<UL>		<LI><A HREF="#Heading2">Using the Array Classes</A>		<LI><A HREF="#Heading3">Using the List Classes</A>		<LI><A HREF="#Heading4">Using the Map Classes</A>		<LI><A HREF="#Heading5">&Acirc;GetNext(pos)-&gt;m_dDiameter);</A>	</UL>	<LI><A HREF="#Heading6">Using the Coordinate-Handling Classes</A>	<UL>		<LI><A HREF="#Heading7">Using the CPoint Class</A>		<LI><A HREF="#Heading8">Using the CRect Class</A>		<LI><A HREF="#Heading9">&Acirc;AfxMessageBox(&quot;Hit! - ptTest2&quot;);</A>		<LI><A HREF="#Heading10">Using the CSize Class</A>	</UL>	<LI><A HREF="#Heading11">Using the Time-Handling Classes</A>	<UL>		<LI><A HREF="#Heading12">Using the COleDateTime Class</A>		<LI><A HREF="#Heading13">Using the COleDateTimeSpan Class</A>	</UL>	<LI><A HREF="#Heading14">Using the String Manipulation Class</A>	<UL>		<LI><A HREF="#Heading15">Using the CString Class</A>		<LI><A HREF="#Heading16">String Manipulation</A>		<LI><A HREF="#Heading17">Searching Strings</A>		<LI><A HREF="#Heading18">Formatting Text for Display</A>	</UL></UL><P><HR SIZE="4"><BR><I>by Jon Bates</I></P><P><H2><A NAME="Heading1"></A>Using the Collection Classes</H2><P>You'll quickly find that in any object-oriented program you write, objects mustbe grouped and stored into collections of different types and sizes. Once again,the MFC comes to the rescue with sets of easy-to-use classes and templates to helpwith this common requirement.</P><P>The collection classes fall into three broad categories--arrays, maps, and lists--thathave their particular niches.</P><P>Arrays are the mainstay of collection classes and are useful for implementingobject containers. Each object in an array has a zero-based position or index, whichis used to locate and reference the object.</P><P>Lists are useful when you want to think of your data as being linked sequentially,each item to the next. They are useful when you must quickly add or remove itemsto the head or tail of the list. You can also traverse the list forward or backwardfrom one item to the next.</P><P>Maps are used to associate data against a key item such as a string or numberwhere the associations are sparse and random. For example, you might use a map toassociate objects with zip or postal codes. They are good at fast retrieval of objectsgiven the association key and can be used as short-term data caches for large databases.</P><P><H3><A NAME="Heading2"></A>Using the Array Classes</H3><P>MFC provides several predefined array classes and a generic array template sothat you can create arrays to hold your own customized objects. (The latter is coveredlater in this chapter, in the &quot;Creating Custom Collection Classes&quot; section.)</P><P>Several predefined array classes offer quick and easy array access for commontypes of variables and objects, as shown in Table F.1.</P><P><H4>TABLE F.1.&nbsp;PREDEFINED ARRAY-BASED CLASSES.</H4><P><TABLE BORDER="1">	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"><I>Array Class</I></TD>		<TD ALIGN="LEFT"><I>Types of Variable Held</I></TD>		<TD ALIGN="LEFT"><I>Numeric Range of Type</I></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">CByteArray</TD>		<TD ALIGN="LEFT">BYTE--8-bit</TD>		<TD ALIGN="LEFT">0 to 255</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"></TD>		<TD ALIGN="LEFT">unsigned values</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">CWordArray</TD>		<TD ALIGN="LEFT">WORD--16-bit</TD>		<TD ALIGN="LEFT">0 to 65535</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"></TD>		<TD ALIGN="LEFT">unsigned values</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">CUIntArray</TD>		<TD ALIGN="LEFT">UINT--32-bit</TD>		<TD ALIGN="LEFT">0 to 4294967295</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"></TD>		<TD ALIGN="LEFT">unsigned integer</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"></TD>		<TD ALIGN="LEFT">values</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">CDWordArray</TD>		<TD ALIGN="LEFT">DWORD--32-bit</TD>		<TD ALIGN="LEFT">0 to 4294967295</TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"></TD>		<TD ALIGN="LEFT">unsigned integer</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"></TD>		<TD ALIGN="LEFT">values</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">CStringArray</TD>		<TD ALIGN="LEFT">CString--text</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"></TD>		<TD ALIGN="LEFT">string objects</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">CObArray</TD>		<TD ALIGN="LEFT">CObject--any</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"></TD>		<TD ALIGN="LEFT">CObject-derived</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"></TD>		<TD ALIGN="LEFT">objects</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">CPtrArray</TD>		<TD ALIGN="LEFT">void*--any object</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"></TD>		<TD ALIGN="LEFT">pointers or memory</TD>		<TD ALIGN="LEFT"></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"></TD>		<TD ALIGN="LEFT">addresses</TD>		<TD ALIGN="LEFT"></TD>	</TR></TABLE></P><P>There are several member functions for each array class that differ only by thetype of variables they hold. Each function discussed can be used with any array classesto deal with variables of their corresponding type.</P><P>One of the most useful aspects of these array classes is their capability to growdynamically. Normal C/C++ arrays are predefined in size and can be extended onlyby lots of messy reallocations of memory. The collection classes hide these reallocationsso that you can simply call the Add() member of an array object to add a new value.For example, to add strings to a CStringArray, you can use code similar to this:</P><P><PRE>CStringArray myStringArray;myStringArray.Add(&quot;Red&quot;);myStringArray.Add(&quot;Green&quot;);myStringArray.Add(&quot;Blue&quot;);</PRE><P>You can then find the size of an array by calling the GetSize() function; forexample, the following line used after the previous lines would return three itemsinto nNumberOfItems:</P><P><PRE>int nNumberOfItems = myStringArray.GetSize();</PRE><P>You can also set the array to a specific size using the corresponding SetSize()function, which will extend or truncate the array to the specified size you pass.</P><P>Values can be set to the array by using the SetAt() function that passes a zero-basedindex and the value to be stored. SetAt() will assert whether the index is largerthan the current array size. You can then retrieve values from the array using theGetAt() function, which will return the value at the index position that you specify.You might use these functions with a CWordArray like this:</P><P><PRE>CWordArray myWordArray;myWordArray.SetSize(20);myWordArray.SetAt(0,200);myWordArray.SetAt(19,500);TRACE(&quot;Value at index position 19 is %d\n&quot;,         myWordArray.GetAt(19));</PRE><P>These lines will set the first element of a 20-element array to 200 and the lastto 500 and display the value 500 when executed. You can still grow the array by callingthe Add() function and find the uppermost valid index by calling GetUpperBound(),which will return the zero-based index, or -1 if there are no elements present.</P><P>You can use the [ ] operators to set and get values at a specific index just likea normal C++ array. For example, the GetAt() and SetAt() functions in the previouslines could be replaced with the [ ] operators like this:</P><P><PRE>myWordArray[0] = 200;myWordArray[19] = 500;TRACE(&quot;Value at index position 19 is %d\n&quot;,        myWordArray.GetAt[19]);</PRE><P>Using the InsertAt() and RemoveAt() functions, you can insert or remove itemsat a specific position, which results in all the items shifting up or down by oneor more elements.</P><P>The InsertAt() function has two forms; the first needs an index position and anelement to insert there. You can also optionally pass it a count to insert multiplecopies of the specified element. The second form lets you insert another whole arrayat a specified index position.</P><P>The RemoveAt() function needs only one parameter to specify the index value ofthe item to be removed, but you can also optionally pass a count as the second parameterto remove a number of elements. The remaining array elements will then be shifteddown to fill the gap.</P><P>You can remove all the elements of an array by calling the RemoveAll() function.</P><BLOCKQUOTE>	<P><HR>MANAGING MEMORY WITH COBARRAY<I> </I>AND CPTRARRAY</P>	<P>You must be careful to delete objects that you have allocated with new and stored	in a CObArray or CPtrArray because these arrays only hold pointers to the elements	(not elements themselves). Therefore, a RemoveAll() call will only remove the pointers	to the objects and not free the memory used by the objects themselves. <HR></BLOCKQUOTE><H3><A NAME="Heading3"></A>Using the List Classes</H3><P>There are only three categories of lists as shown in Table F.2 and a templatefor your own types (discussed later). There is seldom any need to have a list ofsimple integer values. Instead, you would probably need a linked list of your ownCObject-derived classes or pointers to a number of C++ classes or structures.</P><P><H4>TABLE F.2.&nbsp;THE LIST-BASED COLLECTION CLASSES.</H4><P><TABLE BORDER="1">	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT"><I>Class Name</I></TD>		<TD ALIGN="LEFT"><I>Type of Variable Held</I></TD>	</TR>	<TR ALIGN="LEFT" VALIGN="TOP">		<TD ALIGN="LEFT">CObList</TD>		<TD ALIGN="LEFT">CObject--Pointers to any CObject-derived objects.</TD>	</TR>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品福利一二区| 久久精品亚洲精品国产欧美| 激情另类小说区图片区视频区| 国产精品乱人伦| 日韩欧美一区二区免费| 91福利在线导航| 成人免费高清视频| 麻豆精品新av中文字幕| 亚洲成人一二三| 国产精品国产三级国产专播品爱网| 日韩午夜av电影| 欧美专区在线观看一区| av福利精品导航| 国产河南妇女毛片精品久久久| 日本不卡一二三| 亚洲成av人片| 亚洲综合在线五月| 亚洲欧美日韩精品久久久久| 久久久久久一二三区| 日韩免费观看高清完整版 | 在线观看91精品国产麻豆| 成人91在线观看| 国产激情视频一区二区三区欧美 | 老司机午夜精品| 五月婷婷另类国产| 亚洲国产wwwccc36天堂| 亚洲欧美另类综合偷拍| 国产精品三级电影| 国产精品久久久久久久久免费相片 | 国产精品女主播av| 91精品国产乱码久久蜜臀| 99视频超级精品| 成人精品一区二区三区四区| 国产精品影视网| 国产精品中文字幕一区二区三区| 美腿丝袜亚洲一区| 奇米影视在线99精品| 琪琪一区二区三区| 美女网站视频久久| 激情小说欧美图片| 韩国一区二区三区| 国产一二三精品| 国产成a人亚洲精品| 粉嫩绯色av一区二区在线观看| 成人av电影在线网| 一本色道久久综合亚洲精品按摩| 色综合天天做天天爱| 色婷婷香蕉在线一区二区| 欧亚洲嫩模精品一区三区| 欧美人狂配大交3d怪物一区| 色综合色综合色综合| 国产精品中文欧美| 一区二区三区免费网站| 国产欧美一区二区精品性| 日韩精品专区在线影院观看| 久久久蜜桃精品| 国产欧美日韩卡一| 综合色中文字幕| 婷婷综合久久一区二区三区| 日本视频一区二区三区| 国产一区二区三区精品视频| 成人永久aaa| 欧美性色aⅴ视频一区日韩精品| 精品视频1区2区| 久久先锋资源网| 亚洲美女在线国产| 日本人妖一区二区| 粗大黑人巨茎大战欧美成人| 91福利社在线观看| 欧美电视剧在线看免费| 国产精品初高中害羞小美女文| 亚洲成在线观看| 国产一区二区三区在线观看精品| 成人高清在线视频| 7777精品伊人久久久大香线蕉| 国产亚洲一区二区三区四区 | 日本欧美一区二区| 久久精品人人做人人综合| 亚洲日本一区二区| 美女爽到高潮91| 高潮精品一区videoshd| 欧美天堂亚洲电影院在线播放| 欧美va亚洲va在线观看蝴蝶网| 国产精品初高中害羞小美女文| 日韩一区精品字幕| 成人av在线网| 日韩亚洲欧美在线观看| 亚洲女爱视频在线| 韩国欧美国产1区| 欧美三级一区二区| 国产精品网站在线播放| 青草国产精品久久久久久| 99久久99久久精品免费观看| 欧美久久一二区| 亚洲免费观看视频| 国产精品1区2区| 欧美肥胖老妇做爰| 亚洲人成网站在线| 国产黑丝在线一区二区三区| 777久久久精品| 亚洲女爱视频在线| 成人高清视频在线| 久久综合中文字幕| 日韩精品欧美精品| 欧美视频在线不卡| 亚洲视频资源在线| 成人免费的视频| 久久你懂得1024| 蜜臀久久99精品久久久画质超高清| 91一区在线观看| 国产精品三级av| 国产激情视频一区二区三区欧美 | 在线播放亚洲一区| 国产欧美一区二区精品性色超碰 | 国产日韩成人精品| 经典三级在线一区| 在线播放中文字幕一区| 亚洲一区二区影院| av男人天堂一区| 国产精品你懂的| 国产成人在线视频免费播放| 日韩一区二区三区视频在线 | 水蜜桃久久夜色精品一区的特点 | 日韩一区二区电影网| 亚洲成在人线在线播放| 欧美在线不卡视频| 一区二区三区在线观看欧美 | 久久精品视频一区| 美女任你摸久久| 日韩精品乱码av一区二区| 秋霞成人午夜伦在线观看| 亚洲免费av高清| 国产日韩欧美亚洲| 国产亚洲欧美一区在线观看| 91精品免费观看| 国产剧情av麻豆香蕉精品| 国产精品久久午夜夜伦鲁鲁| 天堂av在线一区| 欧美久久免费观看| 日韩avvvv在线播放| 欧美一区二区三区日韩| 美脚の诱脚舐め脚责91| 欧美精品一区二区久久久| 久久国产精品色| 国产视频视频一区| 97aⅴ精品视频一二三区| 亚洲欧美日韩国产一区二区三区 | 久久精品人人做人人综合| 国产福利一区二区| 亚洲私人影院在线观看| 欧美午夜精品理论片a级按摩| 亚洲3atv精品一区二区三区| 亚洲最新在线观看| 亚洲一二三四区| 日韩一级片在线播放| 91老师片黄在线观看| 一区二区三区四区在线| 在线成人免费视频| 国产主播一区二区| 国产精品久久久久久亚洲伦| 欧美专区日韩专区| 蜜桃精品视频在线| 亚洲国产高清在线| 在线观看日韩毛片| 精品亚洲国产成人av制服丝袜| 国产婷婷色一区二区三区| 91日韩精品一区| 免费不卡在线观看| 成人欧美一区二区三区| 欧美日韩国产精品自在自线| 韩国欧美国产一区| 亚洲免费观看视频| 亚洲精品一区二区三区99| 日本久久一区二区| 国产一区二区三区高清播放| 亚洲精品你懂的| 久久久综合九色合综国产精品| 色欧美片视频在线观看| 激情图区综合网| 一区二区三区高清| 久久一区二区三区四区| 91成人免费在线| 国产成人h网站| 视频一区视频二区中文字幕| 国产欧美日韩亚州综合| 欧美三电影在线| 成人丝袜18视频在线观看| 日韩国产欧美视频| 中文字幕一区二区三| 日韩精品一区二区三区在线观看 | 色偷偷一区二区三区| 精品在线观看免费| 有码一区二区三区| 国产午夜三级一区二区三| 在线不卡免费欧美| 色中色一区二区| 成人av电影免费在线播放| 久久国产生活片100| 亚洲韩国精品一区| 亚洲人午夜精品天堂一二香蕉|