文件名称:TransparentBitmap
- 所属分类:
- 图片显示浏览
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 88kb
- 下载次数:
- 0次
- 提 供 者:
- wyh****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
位图透明化显示:实现这种透明有两种方法,一种是让背景色成为白色,然后与对话框背景色进行与运算;还有一种是让背景色成为黑色,然后与对话框背景色进行或运算。这样位图的背景色就消失了。
1)创建一张大小与需要绘制图像相同的位图作为“掩码”位图;
2)将新创建的“掩码”位图存储至掩码位图的设备描述表中;
3)把位图设备描述表的背景设置成“透明色”,即不需要显示的颜色;
4)复制粘贴位图到“掩码”位图的设备描述表中,这个时候“掩码”位图设备描述表中存放的位图与位图设备描述表中的位图一样;
5)把需要透明绘制的位图与对话框绘图相应区域的背景进行逻辑异或操作绘制到对话框上;
6)把“掩码”位图与这个时候对话框相应区域的背景进行逻辑与的操作;
7)最后一步重复步骤5的操作,把需要透明绘制的位图与对话框绘图相应区域的背景进行逻辑异或操作绘制到对话框上 -Transparent bitmap display: 1) to create a size with the need to draw the images with the same bitmap as the mask bitmap 2) the newly created " mask" bitmaps stored in the mask bitmap device descr iption table 3) the background of the bitmap device context is set to " transparent color" that does not require the display of color 4) copy and paste the bitmap to mask bitmap device context, this time the mask bitmap device descr iptor table stored in a bitmap and a bitmap device descr iption table in the bitmap 5) the need to draw transparent bitmap dialog box, drawing the corresponding region of the background drawn to the dialog box on the logical XOR operation 6) " mask" bitmap dialog box, the corresponding region of the background this time, the logic and operation 7) The final step Repeat step 5 of the operation, the need to draw transparent bitmap dialog box, drawing the corresponding region of the background logical XOR operation to draw on the dialo
1)创建一张大小与需要绘制图像相同的位图作为“掩码”位图;
2)将新创建的“掩码”位图存储至掩码位图的设备描述表中;
3)把位图设备描述表的背景设置成“透明色”,即不需要显示的颜色;
4)复制粘贴位图到“掩码”位图的设备描述表中,这个时候“掩码”位图设备描述表中存放的位图与位图设备描述表中的位图一样;
5)把需要透明绘制的位图与对话框绘图相应区域的背景进行逻辑异或操作绘制到对话框上;
6)把“掩码”位图与这个时候对话框相应区域的背景进行逻辑与的操作;
7)最后一步重复步骤5的操作,把需要透明绘制的位图与对话框绘图相应区域的背景进行逻辑异或操作绘制到对话框上 -Transparent bitmap display: 1) to create a size with the need to draw the images with the same bitmap as the mask bitmap 2) the newly created " mask" bitmaps stored in the mask bitmap device descr iption table 3) the background of the bitmap device context is set to " transparent color" that does not require the display of color 4) copy and paste the bitmap to mask bitmap device context, this time the mask bitmap device descr iptor table stored in a bitmap and a bitmap device descr iption table in the bitmap 5) the need to draw transparent bitmap dialog box, drawing the corresponding region of the background drawn to the dialog box on the logical XOR operation 6) " mask" bitmap dialog box, the corresponding region of the background this time, the logic and operation 7) The final step Repeat step 5 of the operation, the need to draw transparent bitmap dialog box, drawing the corresponding region of the background logical XOR operation to draw on the dialo
(系统自动生成,下载前可以参看下载内容)
下载文件列表
TransparentBitmap\Debug\TransparentBitmap.exe
.................\Debug
.................\ReadMe.txt
.................\res\test.bmp
.................\...\TransparentBitmap.ico
.................\...\TransparentBitmap.rc2
.................\res
.................\resource.h
.................\StdAfx.cpp
.................\StdAfx.h
.................\TransparentBitmap.aps
.................\TransparentBitmap.clw
.................\TransparentBitmap.cpp
.................\TransparentBitmap.dsp
.................\TransparentBitmap.h
.................\TransparentBitmap.rc
.................\TransparentBitmap1.cpp
.................\TransparentBitmap1.h
.................\TransparentBitmapDlg.cpp
.................\TransparentBitmapDlg.h
TransparentBitmap
.................\Debug
.................\ReadMe.txt
.................\res\test.bmp
.................\...\TransparentBitmap.ico
.................\...\TransparentBitmap.rc2
.................\res
.................\resource.h
.................\StdAfx.cpp
.................\StdAfx.h
.................\TransparentBitmap.aps
.................\TransparentBitmap.clw
.................\TransparentBitmap.cpp
.................\TransparentBitmap.dsp
.................\TransparentBitmap.h
.................\TransparentBitmap.rc
.................\TransparentBitmap1.cpp
.................\TransparentBitmap1.h
.................\TransparentBitmapDlg.cpp
.................\TransparentBitmapDlg.h
TransparentBitmap