赞
踩
作者:中国嵌入式系统开发
实现两张图片叠加,半透明效果。
sdmmclogozx.bmp和sdmmclogohangsheng.bmp
void CGPS_eDogDlg::TransBitmap(HDC hDC,RECT rect,double Trans)
{
int nWidth = rect.right - rect.left; //半透明区域的宽度
int nHeight = rect.bottom - rect.top; //半透明区域的高度
HDC hBackDC;
hBackDC = CreateCompatibleDC(hDC);
HBITMAP hBackBitmap;
hBackBitmap = (HBITMAP)SHLoadDIBitmap(_T(sdmmclogozx.bmp));
SelectObject(hBackDC,hBackBitmap);
HBITMAP hUpBitmap;
HDC hUpDC;
hUpDC = CreateCompatibleDC(hDC);
hUpBitmap = (HBITMAP)SHLoadDIBitmap(_T(sdmmclogohangsheng.bmp));
SelectObject(hUpDC,hUpBitmap);
//新建一个DC来拷贝目标区域
HDC BackDC;
BackDC = CreateCom
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。