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

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

?? ch18.htm

?? 一天之內(nèi)學會VC#. 主要介紹VC#的各種應用和示例
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><HTML><HEAD>		<META NAME="GENERATOR" Content="Symantec Visual Page Mac 1.1">	<TITLE>Teach Yourself Visual C++&#174; 5 in 24 Hours -- Hour 18 -- List View 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++&#174; 5 in 24 Hours</FONT></H1><CENTER><P><A HREF="../ch17/ch17.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch19/ch19.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 18 -<BR>List View Controls</FONT></H1><P>List views are extremely flexible controls that allow information to be displayedin a variety of ways. In this hour, you will learn<UL>	<LI>How to use image lists with the list view control<BR>	<BR>		<LI>How to switch between different display styles in a list view control<BR>	<BR>		<LI>How to allow the user to edit individual list items</UL><H2><FONT COLOR="#000077"><B>What Is a List View Control?</B></FONT></H2><P>List view controls are one of the new common controls first released with Windows95. A list view control is used to display information and an associated icon inone of four different formats:<UL>	<LI>Icon view displays rows of 32x32 pixel icons.<BR>	<BR>		<LI>Small icon view displays rows of smaller 16x16 pixel icons.<BR>	<BR>		<LI>List view displays small icons and list items arranged in a column.<BR>	<BR>		<LI>Report view displays items and their associated icons, along with subitems that	are arranged in columns.</UL><P>When you use a list view control, you can provide a menu or other method to enablethe user to switch between the different viewing modes.</P><P>The Windows Explorer uses a list view control and offers all four view styles.The Explorer is shown in Figure 18.1 with the contents of the <TT>C:\</TT> directorycontained in a large icon view.</P><P><A NAME="01"></A><A HREF="01.htm"><B>Figure 18.1.</B></A> <BR><I>The Windows Explorer uses a list view control.</I></P><P>List views are very popular with users because they offer several different waysto display information. When you allow the user to switch between view styles, thelist view control puts the user in charge of how information is displayed.</P><P>List view controls can be used to associate different icons with items storedin the list view control, as the Explorer does for filenames. The user is free toselect between different sized icons, or even the report view, which can displayextra information about each item. List view controls also support drag-and-dropoperations, which enable the user to easily move items to or from a list view control.<H2><FONT COLOR="#000077"><B>List View Control Properties</B></FONT></H2><P>The list view control's properties are set using the Properties dialog box inthe same way other controls are. Some of the properties available for list view controlsare also available for list boxes. The list view control property options includethe following:<UL>	<LI><I>ID</I> is used for the list view control resource ID. A default resource ID,	such as <TT>IDC_LIST1</TT>, is supplied by Developer Studio.<BR>	<BR>		<LI><I>Visible</I><B> </B>is used to indicate that the control is initially visible.	This check box is usually checked.<BR>	<BR>		<LI><I>Disabled</I><B> </B>is used to indicate that the list should be initially	disabled. This check box is usually cleared.<BR>	<BR>		<LI><I>Group</I><B> </B>is used to mark the first control in a group. This check	box is usually cleared.<BR>	<BR>		<LI><I>Tab Stop</I><B> </B>indicates that this control can be reached by pressing	Tab on the keyboard. This check box is usually checked.<BR>	<BR>		<LI><I>Help ID</I><B> </B>indicates that a context-sensitive help ID should be created	for this control. This check box is normally cleared.<BR>	<BR>		<LI><I>View</I><B> </B>specifies the initial view used by the list view control.	Possible values are Icon, Small Icon, List, or Report.<BR>	<BR>		<LI><I>Align</I> specifies whether the items are aligned to the top or left sides	of the control. This property applies only in the icon or small icon views.<BR>	<BR>		<LI><I>Sort</I> enables items to be sorted based on their labels as they are entered	into the list view control.<BR>	<BR>		<LI><I>Auto Arrange</I> specifies that items should be kept arranged when viewed	in the icon or small icon views.<BR>	<BR>		<LI><I>Single Selection</I><B> </B>enables a single list view item to be selected.<BR>	<BR>		<LI><I>No Label Wrap</I><B> </B>specifies that each item label must be displayed	on a single line rather than wrapped, as is the standard behavior.<BR>	<BR>		<LI><I>Edit Labels</I><B> </B>enables labels to be edited by the user. If this property	is enabled, you must handle edit notification messages sent by the control.<BR>	<BR>		<LI><I>Owner Draw Fixed</I><B> </B>indicates that the owner of the control, instead	of Windows, is responsible for drawing the control.<BR>	<BR>		<LI><I>No Scroll</I><B> </B>disables scrolling.<BR>	<BR>		<LI><I>No Column Header</I> removes the header control that is usually included in	the report view.<BR>	<BR>		<LI><I>No Sort Header</I> disables the sorting function that is available through	the header control.<BR>	<BR>		<LI><I>Share Image List</I> indicates that the image list used by the list view control	is shared with other image lists. You must destroy the image list manually after	the last list view control has been destroyed.<BR>	<BR>		<LI><I>Show Selection Always</I> indicates that a selected item is always highlighted,	even if the list view control doesn't have the focus.<BR>	<BR>		<LI><I>Border</I><B> </B>indicates that a border should be drawn around the control.</UL><H3><FONT COLOR="#000077"><B>A List View Control Example</B></FONT></H3><P>As an example of how the basic properties of list view controls are used, createa dialog box-based application. This program displays a list view control containingthree items. You can use radio buttons to switch between the different view styles.</P><P>Use AppWizard to create a dialog box-based application named ListEx. Feel freeto accept any of the options offered by AppWizard; this example works with any AppWizardparameters.<H3><FONT COLOR="#000077"><B>Adding Controls to the ListEx Dialog Box</B></FONT></H3><P>You must add a total of five controls to the ListEx main dialog box: four radiobuttons and one list view control. Add the controls to the dialog box as shown inFigure 18.2.</P><P><A NAME="02"></A><A HREF="02.htm"><B>Figure 18.2.</B></A> <BR><I>The ListEx main dialog box in the dialog editor.</I></P><P>Properties for the list view and radio button controls are listed in Table 18.1.All properties that aren't listed should be set to the default values.<H4><FONT COLOR="#000077">Table 18.1. Property values for controls in the ListExmain dialog box.</FONT></H4><P><TABLE BORDER="1">	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><B>Control</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Resource ID</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Caption</B></TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP">Icon view radio</TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_RADIO_ICON</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP">&amp;Icon</TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP">Small radio</TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_RADIO_SMALL</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP">&amp;Small</TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP">List radio</TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_RADIO_LIST</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP">&amp;List</TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP">Report radio</TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_RADIO_REPORT</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP">&amp;Report</TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP">List view control</TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_LIST</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP">none</TD>	</TR></TABLE></P><P>Use ClassWizard to associate a <TT>CListCtrl</TT> member variable with <TT>IDC_LIST</TT>,using the values from Table 18.2.<H4><FONT COLOR="#000077">Table 18.2. Values for a new CListCtrl member variablein CListExDlg.</FONT></H4><P><TABLE BORDER="1">	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><B>Control ID</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Variable Name</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Category</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Type</B></TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_LIST</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>m_listCtrl</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>Control</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>CListCtrl</TT></TD>	</TR></TABLE></P><P>Next, use ClassWizard to create message-handling functions that are called whenthe radio buttons are selected. Add a total of four member functions to the <TT>CListExDlg</TT>class, using the values from Table 18.3.<H4><FONT COLOR="#000077">Table 18.3. Values for new CListCtrl member functions inCListExDlg.</FONT></H4><P><TABLE BORDER="1">	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><B>Object ID</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Class Name</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Message</B></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><B>Function</B></TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_RADIO_ICON</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>CListExDlg</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>BN_CLICKED</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>OnRadioIcon</TT></TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_RADIO_SMALL</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>CListExDlg</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>BN_CLICKED</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>OnRadioSmall</TT></TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_RADIO_LIST</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>CListExDlg</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>BN_CLICKED</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>OnRadioList</TT></TD>	</TR>	<TR ALIGN="LEFT" rowspan="1">		<TD ALIGN="LEFT" VALIGN="TOP"><TT>IDC_RADIO_REPORT</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>CListExDlg</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>BN_CLICKED</TT></TD>		<TD ALIGN="LEFT" VALIGN="TOP"><TT>OnRadioReport</TT></TD>	</TR></TABLE><H3><FONT COLOR="#000077"><B>Associating Image Lists with a List Control</B></FONT></H3><P>The images displayed in the list view next to each item are stored in image liststhat are associated with the list view control. Constructing and managing image listswas discussed in Hour 17, &quot;Using Image Lists and Bitmaps.&quot; An image listis added to a list view control with the <TT>SetImageList</TT> function:</P><PRE><FONT COLOR="#0066FF"><TT>m_listCtrl.SetImageList( &amp;m_imageSmall, LVSIL_SMALL );</TT></FONT></PRE><P>Two parameters are passed to the list view control: the address of the image listand a style parameter that indicates the type of images stored in the image list.There are three image list types.<UL>	<LI><TT>LVSIL_NORMAL</TT> is used for the image list used in the icon view.<BR>	<BR>		<LI><TT>LVSIL_SMALL</TT> is used for the image list used in the small icon view.<BR>	<BR>		<LI><TT>LVSIL_STATE</TT> is used for optional state images, such as check marks.</UL><BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Just a Minute:</B></FONT><B> </B>After the image	list control has been added to the list view control, the list view control takes	responsibility for destroying the image list. <HR></P>	<P><HR><B> </B><FONT COLOR="#000077"><B>CAUTION:</B></FONT><B> </B>If the Share image list	property has been selected, the list view control will not destroy the image list.	You must destroy it yourself after the list view has been destroyed.<BR>	If you don't destroy the image list, you will create a memory leak. If you destroy	the image list too early, the list view control will behave unpredictably. <HR></BLOCKQUOTE><H3><FONT COLOR="#000077"><B>Creating the Image Lists</B></FONT></H3><P>You must create two bitmaps for the ListEx application. One bitmap is used forthe large icon bitmap and one for the small icon bitmap. The two bitmaps are shownin Figure 18.3. Each of the bitmaps contains two balls of the same size, and each

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩视频一区二区三区| 在线观看日产精品| 中文字幕精品三区| 成人一区在线看| 国产精品国产三级国产a| www.视频一区| 亚洲综合在线第一页| 69堂国产成人免费视频| 视频一区二区欧美| 久久久久一区二区三区四区| 丰满少妇久久久久久久 | 91精品国产美女浴室洗澡无遮挡| 午夜激情综合网| 久久嫩草精品久久久久| 99视频在线精品| 婷婷成人综合网| 亚洲精品在线电影| 色婷婷av一区二区三区大白胸| 亚洲在线视频免费观看| 日韩精品影音先锋| www.亚洲精品| 麻豆精品久久精品色综合| 国产女人aaa级久久久级 | 666欧美在线视频| 国产伦精一区二区三区| 曰韩精品一区二区| 亚洲精品在线观看视频| 在线欧美日韩国产| 国产一区二区精品在线观看| 亚洲激情五月婷婷| 久久久久久一级片| 欧美主播一区二区三区| 国产成人精品午夜视频免费| 亚洲激情图片一区| 国产亚洲欧美在线| 6080国产精品一区二区| 99麻豆久久久国产精品免费| 日本欧美一区二区三区| 亚洲免费av网站| 欧美精品一区二区三区一线天视频| 91浏览器打开| 国产91丝袜在线播放| 三级不卡在线观看| 亚洲六月丁香色婷婷综合久久| 精品国产91亚洲一区二区三区婷婷| 94-欧美-setu| 国产v日产∨综合v精品视频| 午夜精品久久久久久久99樱桃| 国产精品网站在线观看| 欧美一区二区三区视频在线观看| 91麻豆国产精品久久| 国产精品影视在线| 免费高清不卡av| 亚洲成人综合网站| 一区二区视频在线| 精品伊人久久久久7777人| 亚洲靠逼com| 精品少妇一区二区三区在线播放| 亚洲人xxxx| 国产片一区二区| 精品国产伦一区二区三区免费| 欧美性猛片xxxx免费看久爱| jvid福利写真一区二区三区| 国产东北露脸精品视频| 毛片不卡一区二区| 日本午夜精品一区二区三区电影 | 日韩理论片在线| 国产日韩v精品一区二区| 91精品国产欧美一区二区成人| 99久久久久久| 99国产精品视频免费观看| 国产成人亚洲综合a∨猫咪| 国产精品小仙女| 韩国欧美国产1区| 久久99国产精品免费| 国内不卡的二区三区中文字幕 | 精品日韩欧美一区二区| 7777精品伊人久久久大香线蕉的 | 欧洲在线/亚洲| 欧美在线观看一区| 欧美在线观看禁18| 欧美伊人精品成人久久综合97| 91免费版在线| 91黄视频在线| 69堂精品视频| 精品国产一区二区亚洲人成毛片| 精品久久久影院| 国产亚洲自拍一区| 中文字幕亚洲一区二区va在线| 国产精品美女久久久久久久| 日韩理论片在线| 亚洲午夜免费电影| 免费看日韩精品| 国产精品小仙女| 91视频在线看| 欧美顶级少妇做爰| 2020国产成人综合网| 国产精品欧美精品| 亚洲综合免费观看高清完整版 | 91香蕉国产在线观看软件| 欧美综合久久久| 欧美一区二区三区成人| 精品国产乱码久久久久久牛牛| 欧美国产精品久久| 亚洲高清中文字幕| 精品一区二区三区香蕉蜜桃| 国产成人免费视频网站高清观看视频| 9色porny自拍视频一区二区| 精品视频在线视频| 精品国产网站在线观看| 国产精品不卡一区二区三区| 午夜国产精品影院在线观看| 精品一区二区三区免费毛片爱| av色综合久久天堂av综合| 欧美日韩精品一区视频| 欧美videossexotv100| 国产精品夫妻自拍| 天堂久久一区二区三区| 粉嫩一区二区三区性色av| 欧美调教femdomvk| 久久精品夜色噜噜亚洲aⅴ| 亚洲一区自拍偷拍| 国产精品一区二区果冻传媒| 欧美性一二三区| 久久青草国产手机看片福利盒子| 亚洲综合999| 成人一级片在线观看| 欧美一区二区三区日韩视频| 国产精品久久久久桃色tv| 日韩av中文字幕一区二区 | 激情偷乱视频一区二区三区| 成人精品免费看| 欧美一区二区三区男人的天堂 | 亚洲va在线va天堂| av午夜一区麻豆| 久久久综合激的五月天| 视频在线观看91| 色综合久久中文字幕| 久久久国产精华| 免费视频最近日韩| 欧美精三区欧美精三区| 一区二区三区在线视频观看 | 成人三级在线视频| 欧美va日韩va| 奇米色一区二区| 欧美羞羞免费网站| 亚洲精品高清在线| 91美女在线视频| 中文乱码免费一区二区| 国产乱码精品一品二品| 日韩无一区二区| 日韩福利电影在线| 欧美日韩亚洲综合在线 | 欧美一区二区啪啪| 亚洲成人激情社区| 91黄色免费版| 一区二区三区免费网站| 99国产精品99久久久久久| 国产精品久久久久久一区二区三区| 国产一区二区精品久久91| 精品国产百合女同互慰| 久久99久久99小草精品免视看| 91精品国产综合久久精品app| 亚洲香肠在线观看| 欧美日韩一区小说| 丝袜美腿成人在线| 欧美一卡2卡3卡4卡| 婷婷国产在线综合| 日韩一级二级三级精品视频| 日韩国产欧美一区二区三区| 在线成人av网站| 日本中文一区二区三区| 欧美一区二区黄| 久久91精品国产91久久小草| 精品国产乱码久久久久久夜甘婷婷| 精品一区二区三区免费视频| 久久综合九色综合欧美98| 国产99精品视频| 国产精品久久久久aaaa樱花| 99re6这里只有精品视频在线观看| 亚洲人成网站在线| 欧美色倩网站大全免费| 免费成人在线观看| 国产农村妇女毛片精品久久麻豆 | 亚洲不卡一区二区三区| 欧美一卡二卡在线观看| 国产在线观看一区二区| 国产亚洲综合色| 97精品国产97久久久久久久久久久久| 一级女性全黄久久生活片免费| 欧美精品aⅴ在线视频| 日本亚洲电影天堂| 国产日韩欧美电影| 欧美综合一区二区| 老司机免费视频一区二区| 国产女人aaa级久久久级| 日本韩国一区二区| 精品一区二区久久| 最好看的中文字幕久久| 日韩亚洲国产中文字幕欧美|