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

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

?? ch17.htm

?? 24小時學會vc++
?? HTM
?? 第 1 頁 / 共 2 頁
字號:
bitmap from an image list.</FONT></H4><PRE><FONT COLOR="#0066FF"><TT>void CImageListView::OnDraw(CDC* pDC)</TT><TT>{</TT><TT>    CPoint ptImage( 0, 0 );</TT><TT>    for( int nImage = 0; nImage &lt; 3; nImage++ )</TT><TT>    {</TT><TT>        m_imageList.Draw( pDC, nImage, ptImage, ILD_NORMAL );</TT><TT>        ptImage.x += 50;</TT><TT>    }</TT></FONT></PRE><P><TT>}</TT> The <TT>Draw</TT> member function has four parameters:<UL>	<LI>The device context that represents the drawing surface<BR>	<BR>		<LI>The image list index of the image to be drawn<BR>	<BR>		<LI>The location of the image, represented by a <TT>CPoint</TT> object<BR>	<BR>		<LI>The type of drawing operation to be performed</UL><P>Compile and run the ImageList project. Figure 17.3 shows the current version ofthe ImageList application running.</P><P><A NAME="03"></A><A HREF="03.htm"><B>Figure 17.3.</B> </A><I><BR>Using <TT>ILD_NORMAL</TT> to display the contents of the image list.</I></P><P>There are eight different types of drawing operations:<UL>	<LI><TT>ILD_NORMAL</TT> draws the image directly onto the drawing surface. If the	image is masked, the image will be drawn transparently if the background color for	the image list is the default value of <TT>CLR_NONE</TT>.<BR>	<BR>		<LI><TT>ILD_TRANSPARENT</TT> draws the image transparently. If the image is not masked,	the image is drawn normally.<BR>	<BR>		<LI><TT>ILD_MASK</TT> draws the image mask. If the image list doesn't have a mask,	the image is drawn normally.<BR>	<BR>		<LI><TT>ILD_BLEND25</TT> draws the image and blends it 25 percent with the system	highlight color. If the image list doesn't have a mask, the image is drawn normally.<BR>	<BR>		<LI><TT>ILD_FOCUS</TT> is identical to <TT>ILD_BLEND25</TT>.<BR>	<BR>		<LI><TT>ILD_BLEND50</TT> draws the image and blends it 50 percent with the system	highlight color. If the image list doesn't have a mask, the image is drawn normally.<BR>	<BR>		<LI><TT>ILD_BLEND</TT> is identical to <TT>ILD_BLEND50</TT>.<BR>	<BR>		<LI><TT>ILD_SELECTED</TT> is identical to <TT>ILD_BLEND50</TT>.</UL><P>Figure 17.4 shows the image list items drawn using the <TT>ILD_MASK</TT> style.This allows you to see the image mask generated by the image list.</P><P><A NAME="04"></A><A HREF="04.htm"><B>Figure 17.4.</B></A> <I><BR>Image list items mask drawn using <TT>ILD_MASK</TT>.</I></P><P>The individual image bitmaps stored in an image list can also be extracted asicons using the <TT>ExtractIcon</TT> member function:</P><PRE><FONT COLOR="#0066FF"><TT>HICON hicon = m_imageList.ExtractIcon( nImage );</TT></FONT></PRE><P>The only parameter needed for <TT>ExtractIcon</TT> is the image index. You canthen use the icon extracted just like any icon handle. Icons were discussed in Hour14, &quot;Icons and Cursors.&quot;<H3><FONT COLOR="#000077"><B>Displaying a Transparent Image</B></FONT></H3><P>There are two methods you can use to display an image transparently:<UL>	<LI>Define a background color for the images stored in the image list.<BR>	<BR>		<LI>Use the <TT>ILD_TRANSPARENT</TT> flag for the draw operation.</UL><H4><FONT COLOR="#000077">Using a Background Color</FONT></H4><P>A simple method for drawing a transparent image is to define the background colorthat is used on the image background. The background color of the image list willthen be adjusted to match the surface background color, allowing the drawing surfaceto &quot;shine through,&quot; giving the image a transparent effect. Replace the<TT>CImageList::OnDraw</TT> function with the code provided in Listing 17.5, andthen recompile and run the ImageList program.<H4><FONT COLOR="#000077">TYPE: Listing 17.5. Using the CImageList::Draw functionto display a bitmap transparently.</FONT></H4><PRE><FONT COLOR="#0066FF"><TT>void CImageListView::OnDraw(CDC* pDC)</TT><TT>{</TT><TT>    m_imageList.SetBkColor( RGB(0,255,0) );</TT><TT>    CPoint ptImage( 0, 0 );</TT><TT>    for( int nImage = 0; nImage &lt; 3; nImage++ )</TT><TT>    {</TT><TT>        m_imageList.Draw( pDC, nImage, ptImage, ILD_NORMAL);</TT><TT>        ptImage.x += 50;</TT><TT>    }</TT></FONT></PRE><P><TT>}</TT> If you compile and run the ImageList project, the background of theimages will be set to green. By changing the <TT>RGB</TT> <TT>COLORREF</TT> valuepassed to the <TT>CImageList::SetBkColor</TT> function, you can match any backgroundcolor.<H4><FONT COLOR="#000077">Using the ILD_TRANSPARENT Flag</FONT></H4><P>Another transparent drawing method is to use the <TT>ILD_TRANSPARENT</TT> flagwhen <TT>CImageList::Draw</TT> is called. This tells the image list to combine theimage mask with the bitmap, if a mask exists. If the image list is not masked, theimage is drawn as if <TT>ILD_NORMAL</TT> was used.<H3><FONT COLOR="#000077"><B>Displaying an Overlapped Image</B></FONT></H3><P>An overlapped image is two images from the same bitmap, with one image superimposedon the other. Before using an image as an overlay, it must be defined as an overlayimage. You can define up to four bitmaps per image list as overlays using the <TT>CImageList::SetOverlayImage</TT>function:</P><PRE><FONT COLOR="#0066FF"><TT>m_imageList.SetOverlayImage( 0, 1 );</TT></FONT></PRE><P>The <TT>SetOverlayImage</TT> function takes two parameters: the image index usedas the overlay, and the overlay index used to identify the overlay.<BLOCKQUOTE>	<P><HR><B> </B><FONT COLOR="#000077"><B>Just a Minute:</B></FONT><B> </B>Just to make things	more interesting, unlike almost every other index used in Windows, the overlay index	starts at one instead of zero. <HR></BLOCKQUOTE><P>To use an overlaid image, the <TT>CImageList::Draw</TT> function is used as inprevious examples, except that the <TT>ILD_OVERLAYMASK</TT> flag is used. The <TT>INDEXTOOVERLAYMASK</TT>macro is combined with the <TT>ILD_OVERLAYMASK</TT> flag to specify the overlay imageindex to be combined with the base image. Listing 17.6 is a new version of <TT>OnDraw</TT>that displays an overlaid image using an image list.<H4><FONT COLOR="#000077">TYPE: Listing 17.6. Using the CImageList::Draw functionto display an overlapped image.</FONT></H4><PRE><FONT COLOR="#0066FF"><TT>void CImageListView::OnDraw(CDC* pDC)</TT><TT>{</TT><TT>    m_imageList.SetBkColor( CLR_NONE );</TT><TT>    CPoint ptOverlay( 50, 80 );</TT><TT>    m_imageList.SetOverlayImage( 0, 1 );</TT><TT>    m_imageList.Draw( pDC,</TT><TT>                      2,</TT><TT>                      ptOverlay,</TT><TT> INDEXTOOVERLAYMASK(1) );</TT><TT>}</TT></FONT></PRE><H2><FONT COLOR="#000077"><B>Summary</B></FONT></H2><P>In this chapter, you learned about image lists, a convenient way to display imagesin a Windows program. You used image lists to draw a series of bitmaps that wereopaque, transparent, or overlaid with a second image.<H2><FONT COLOR="#000077"><B>Q&amp;A</B></FONT></H2><DL>	<DD><B>Q I have a bitmap that has a white background color, and also uses white in	the bitmap. How can I draw the background transparently and still draw the white	parts of the bitmap?</B><BR>	<BR>	<B>A</B> Use the bitmap image mask instead of the color mask. One version of the	<TT>CImageList::Add</TT> member function allows you to add two bitmaps to the image	list:</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><TT>nReturn = m_imageList.Add( &amp;bmpImage, &amp;bmpMask );</TT></FONT></PRE></BLOCKQUOTE><PRE><FONT COLOR="#0066FF"><TT></TT></FONT></PRE><DL>	<DD>The second bitmap is a mask bitmap. The parts of the image bitmap that correspond	to black pixels on the mask bitmap will be drawn. The parts of the image bitmap that	correspond to white pixels will be transparent in the final image.<BR>	<BR>	<B>Q How can I store an icon image in an image list?</B><BR>	<BR>	<B>A</B> A version of the <TT>CImageList::Add</TT> member function accepts an icon	handle:</DL><BLOCKQUOTE>	<PRE><FONT COLOR="#0066FF"><TT>nReturn = m_imageList.Add( hIcon );</TT></FONT></PRE></BLOCKQUOTE><PRE><FONT COLOR="#0066FF"><TT></TT></FONT></PRE><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 are the two basic types of image lists?<BR>	<BR>	2. Why would you want to have a &quot;grow-by&quot; parameter greater than one when	creating an image list?<BR>	<BR>	3. What is a transparent image?<BR>	<BR>	4. The color mask is passed as a parameter when adding a bitmap image to the image	list. What is the color mask used for?<BR>	<BR>	5. What drawing style is used to draw the mask for a transparent image?<BR>	<BR>	6. What are the drawing styles that begin with <TT>ILD_BLEND</TT> used for?<BR>	<BR>	7. After a bitmap has been added to the image list, are you required to destroy the	bitmap object or will the image list destroy it for you?<BR>	<BR>	8. What is an overlapped image?</DL><H3><FONT COLOR="#000077"><B>Exercises</B></FONT></H3><DL>	<DD>1. Use an overlay image to combine two images.<BR>	<BR>	2. Experiment by using the <TT>Draw</TT> function with the <TT>ILD_BLENDxx</TT> values	to see how the system highlight color is combined with different types of images.<FONT	COLOR="#000077"></FONT></DL><CENTER><P><HR><A HREF="../ch16/ch16.htm"><IMG SRC="../button/previous.gif" WIDTH="128" HEIGHT="28"ALIGN="BOTTOM" ALT="Previous chapter" BORDER="0"></A><A HREF="../ch18/ch18.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亚洲精华国产精华| 欧美一卡2卡三卡4卡5免费| 中文字幕一区二区不卡| 激情小说亚洲一区| 欧美一区二区精品久久911| 日韩美女啊v在线免费观看| 国产精品一区二区黑丝| 欧美一级二级三级乱码| 亚洲综合久久av| 成人h动漫精品| 国产日韩欧美在线一区| 精品一区二区成人精品| 91精品国产福利| 亚洲制服欧美中文字幕中文字幕| 国产精品小仙女| 欧美va亚洲va在线观看蝴蝶网| 亚洲一区电影777| 色噜噜狠狠一区二区三区果冻| 国产农村妇女精品| 国产激情一区二区三区| 日韩欧美一区二区不卡| 日本网站在线观看一区二区三区| 91福利资源站| 亚洲一二三四区| 在线视频国内一区二区| 亚洲精品第一国产综合野| 91麻豆福利精品推荐| 亚洲视频一区二区在线观看| av在线不卡电影| 综合婷婷亚洲小说| 色av一区二区| 亚洲尤物视频在线| 88在线观看91蜜桃国自产| 亚洲国产中文字幕| 5566中文字幕一区二区电影| 五月婷婷久久综合| 制服丝袜一区二区三区| 蜜臀91精品一区二区三区| 日韩一区二区三区三四区视频在线观看 | 亚洲不卡av一区二区三区| 日本丶国产丶欧美色综合| 一区二区三区精品久久久| 欧美日韩一级二级三级| 青青草91视频| 精品国产髙清在线看国产毛片 | 亚洲一二三四区| 欧美日韩国产成人在线91| 日本不卡在线视频| 亚洲精品一线二线三线| 波多野结衣一区二区三区| 亚洲精品videosex极品| 欧美一区二区精品久久911| 国产麻豆精品95视频| 亚洲婷婷在线视频| 欧美精品日韩一区| 国产美女视频91| 一区二区三区在线高清| 在线成人午夜影院| 国产成人av福利| 亚洲一区二区欧美日韩| 26uuu色噜噜精品一区| 色综合天天综合狠狠| 婷婷久久综合九色综合绿巨人| 日韩女优av电影| 99国产欧美久久久精品| 日韩电影在线观看一区| 国产午夜亚洲精品羞羞网站| 欧美三级三级三级| 国产高清精品在线| 天堂一区二区在线| 国产蜜臀97一区二区三区| 91久久精品一区二区| 黑人巨大精品欧美黑白配亚洲| 亚洲人成在线播放网站岛国| 欧美白人最猛性xxxxx69交| www.成人网.com| 毛片不卡一区二区| 亚洲一区日韩精品中文字幕| 久久精品人人做| 欧美一区二区视频在线观看2020| 成人性生交大片免费看在线播放 | 亚洲欧洲一区二区在线播放| 欧美一级高清片| 色狠狠色噜噜噜综合网| 国产91精品露脸国语对白| 日欧美一区二区| 亚洲欧美精品午睡沙发| 国产欧美一区二区在线| 欧美一级理论片| 欧美亚洲日本一区| 91看片淫黄大片一级在线观看| 久久机这里只有精品| 亚洲愉拍自拍另类高清精品| 国产精品你懂的| 国产偷国产偷亚洲高清人白洁| 日韩一区二区免费在线电影 | 波多野结衣欧美| 国产高清一区日本| 国产一区在线视频| 奇米一区二区三区av| 亚洲线精品一区二区三区| 一区二区三区精品| 一区二区在线观看视频在线观看| 国产精品的网站| 日本一区二区三区在线观看| 久久久久久97三级| 国产亚洲综合在线| 国产亚洲综合性久久久影院| 久久这里只有精品首页| 日韩精品一区二区三区三区免费| 制服丝袜亚洲精品中文字幕| 欧美日本韩国一区| 欧美高清视频在线高清观看mv色露露十八 | 欧美日韩一级黄| 欧美久久久久免费| 777亚洲妇女| 26uuu久久天堂性欧美| 久久―日本道色综合久久| 亚洲精品在线三区| 国产网站一区二区| 亚洲欧美偷拍卡通变态| 亚洲一区在线观看免费| 午夜成人免费电影| 美国精品在线观看| 丁香六月久久综合狠狠色| 99九九99九九九视频精品| 色天天综合久久久久综合片| 欧美综合欧美视频| 欧美一区二区免费观在线| 久久尤物电影视频在线观看| 国产精品视频第一区| 一区二区三区日韩欧美精品| 婷婷久久综合九色综合绿巨人| 久久疯狂做爰流白浆xx| 国产suv精品一区二区883| 色噜噜狠狠一区二区三区果冻| 欧美日韩国产大片| 国产午夜精品一区二区三区视频| 国产精品麻豆视频| 婷婷六月综合亚洲| 东方aⅴ免费观看久久av| 91麻豆蜜桃一区二区三区| 欧美一区二区三区喷汁尤物| 国产欧美综合在线观看第十页| 亚洲人成影院在线观看| 青椒成人免费视频| 97久久人人超碰| 欧美一区二区性放荡片| 日韩一区有码在线| 麻豆一区二区三| 91原创在线视频| 欧美一区二区女人| 亚洲欧美区自拍先锋| 久久精品国产色蜜蜜麻豆| 一本色道a无线码一区v| 日韩手机在线导航| 一区二区成人在线观看| 精品在线亚洲视频| 欧美性生活影院| 国产精品色眯眯| 久久精品国产亚洲a| 色综合久久中文综合久久97 | 国内精品久久久久影院薰衣草| 色综合激情久久| 日本一区二区三区电影| 日韩av一区二区在线影视| 97se狠狠狠综合亚洲狠狠| 欧美xxxx在线观看| 丝袜亚洲另类欧美综合| 色婷婷狠狠综合| 精品国产乱码久久久久久蜜臀| 一区二区三区不卡视频| 国产成人av在线影院| 精品人伦一区二区色婷婷| 午夜视频一区在线观看| 91碰在线视频| 国产女主播在线一区二区| 激情综合色综合久久综合| 7777女厕盗摄久久久| 亚洲黄一区二区三区| 99热在这里有精品免费| 国产欧美一区二区三区网站 | 日韩免费观看2025年上映的电影| 国产精品无码永久免费888| 美女脱光内衣内裤视频久久影院| 色婷婷激情综合| 亚洲人123区| 99视频国产精品| 亚洲欧洲日产国码二区| 成人精品国产一区二区4080| 久久午夜电影网| 国产精品亚洲综合一区在线观看| 欧美一级久久久| 理论片日本一区| 日韩精品一区二区在线观看| 日韩和欧美的一区|