亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产精品欧美一区喷水| 亚洲国产精品精华液网站| 看电影不卡的网站| 91精品啪在线观看国产60岁| 日本视频在线一区| 精品久久久久久最新网址| 国产精品一区二区久久不卡| 国产精品美女久久久久久久久| 91视视频在线观看入口直接观看www| 亚洲三级电影网站| 欧美日韩视频一区二区| 久色婷婷小香蕉久久| 国产亚洲污的网站| 欧美日韩精品一区二区天天拍小说| 九九精品一区二区| 欧美一区二区三区小说| 美女一区二区视频| 精品久久久久久亚洲综合网| 精品亚洲成a人| 久久精品一区蜜桃臀影院| 高清国产一区二区| 中文字幕综合网| 欧美午夜免费电影| 日韩精品欧美精品| 久久综合色综合88| 成人性视频免费网站| 最新热久久免费视频| 色婷婷综合久久久中文字幕| 国产三级一区二区| 粉嫩在线一区二区三区视频| 中文字幕乱码一区二区免费| 欧美性大战久久久久久久 | 福利电影一区二区| 欧美老肥妇做.爰bbww视频| 亚洲精品久久久蜜桃| 在线精品视频免费观看| 日韩一区精品视频| 久久久另类综合| 99久久精品99国产精品| 性久久久久久久久久久久| 精品日韩99亚洲| 成人中文字幕在线| 亚洲激情图片qvod| 欧美成人精品3d动漫h| 91影院在线观看| 天天色 色综合| 国产无一区二区| 欧美日韩国产首页在线观看| 国产乱码精品一区二区三| 亚洲日本乱码在线观看| 欧美日韩高清一区二区不卡 | 视频一区视频二区在线观看| 久久先锋影音av鲁色资源 | 国产在线一区观看| 亚洲精品国产精华液| 精品欧美一区二区在线观看| 色综合久久久久综合体桃花网| 午夜激情一区二区三区| 一区二区三区四区不卡在线| 精品久久久久久久一区二区蜜臀| 99精品视频中文字幕| 美女国产一区二区| 亚洲午夜一二三区视频| 日本一区二区综合亚洲| 日韩精品影音先锋| 欧美三日本三级三级在线播放| 国产成人av一区二区三区在线 | 成人免费在线播放视频| 日韩欧美综合在线| 欧美电影一区二区| 色婷婷综合久色| 国产精品99久久久久久宅男| 免费在线成人网| 亚洲va欧美va人人爽午夜| 日韩伦理电影网| 国产精品女上位| 久久女同性恋中文字幕| 欧美无人高清视频在线观看| 不卡在线视频中文字幕| 99这里只有精品| 国产乱人伦精品一区二区在线观看 | 精品国产91久久久久久久妲己| 精品视频一区 二区 三区| 色一区在线观看| 一本色道久久综合亚洲aⅴ蜜桃| 成人黄色小视频在线观看| 国产盗摄女厕一区二区三区| 黄色日韩网站视频| 久久se这里有精品| 国内精品嫩模私拍在线| 久草在线在线精品观看| 老司机午夜精品| 精品影视av免费| 精东粉嫩av免费一区二区三区| 裸体在线国模精品偷拍| 免费观看在线综合| 久久精品国产亚洲一区二区三区| 日韩vs国产vs欧美| 日本91福利区| 精品一区二区三区免费毛片爱| 久久91精品久久久久久秒播| 麻豆一区二区99久久久久| 精品中文字幕一区二区| 国产一区二区网址| 国产成人av自拍| 99精品桃花视频在线观看| 日本福利一区二区| 欧美私人免费视频| 91精品国产全国免费观看| 日韩一区二区精品在线观看| 精品久久久久99| 国产日韩欧美综合一区| 亚洲欧洲日韩在线| 国产精品二区一区二区aⅴ污介绍| 日本一区二区综合亚洲| 亚洲美女淫视频| 一区二区三区在线视频免费观看| 一区二区三区四区蜜桃| 亚洲国产综合91精品麻豆| 日韩国产精品久久| 久久9热精品视频| 麻豆91在线播放| 成人午夜激情视频| 国产精品久久久99| 国产成人精品1024| 国产91丝袜在线播放九色| 国产一区二区三区精品欧美日韩一区二区三区| 久久99精品久久久久婷婷| 精品在线观看视频| 国产一区二区三区日韩| 99re视频精品| 91精品国产麻豆| 国产日韩欧美精品电影三级在线 | 日韩成人一区二区三区在线观看| 国产资源在线一区| 色94色欧美sute亚洲线路一久| 日韩欧美国产高清| 亚洲人成小说网站色在线| 老色鬼精品视频在线观看播放| 成人av在线网站| 91精品福利在线一区二区三区| 欧美韩国一区二区| 蜜臀av性久久久久蜜臀aⅴ流畅| 99久久99久久精品国产片果冻| 欧美一区二区在线播放| 亚洲欧洲三级电影| 经典三级一区二区| 欧美日韩国产经典色站一区二区三区 | 亚洲精品免费看| 久久99国产精品久久| 欧美亚洲动漫精品| 国产欧美日韩在线| 日本伊人午夜精品| 欧美中文字幕一二三区视频| 国产日韩综合av| 亚洲国产精品自拍| www.性欧美| 精品久久久影院| 亚洲国产视频直播| 成人av网站大全| 日韩欧美精品在线视频| 欧美国产97人人爽人人喊| 亚洲123区在线观看| 波多野结衣在线aⅴ中文字幕不卡 波多野结衣在线一区 | 欧美高清视频一二三区 | 国产一区不卡视频| 91精品国产综合久久精品性色| 最近日韩中文字幕| 成人免费三级在线| 日本一区二区三区高清不卡| 蜜桃久久久久久久| 欧美精品第1页| 亚洲图片一区二区| 色婷婷综合久久久中文一区二区| 国产精品久久影院| 国产精品白丝av| 久久综合九色综合欧美亚洲| 美女视频黄久久| 日韩欧美亚洲国产精品字幕久久久 | 不卡一区二区中文字幕| 国产欧美日韩视频在线观看| 国产一区二区美女| 久久久777精品电影网影网| 久色婷婷小香蕉久久| 精品日韩av一区二区| 97精品电影院| 亚洲欧洲日产国产综合网| 99久久免费国产| 国产精品不卡在线| 99视频一区二区| 亚洲男同1069视频| 色吧成人激情小说| 亚洲国产一区在线观看| 欧美精品在线视频| 首页亚洲欧美制服丝腿| 日韩欧美中文字幕一区| 久久精品国产色蜜蜜麻豆| 久久久精品国产免大香伊| 色欧美日韩亚洲| 激情深爱一区二区|