关于网友提出的“ TransparentBlt 背景能隐藏 图片内容不能显示TransparentBlt 背景能隐藏 图片内容不能显示”问题疑问,本网通过在网上对“ TransparentBlt 背景能隐藏 图片内容不能显示TransparentBlt 背景能隐藏 图片内容不能显示”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题: TransparentBlt 背景能隐藏 图片内容不能显示TransparentBlt 背景能隐藏 图片内容不能显示描述:
图片位图
图片背景--白色,图片内容--箭头以下是实现代码,现象--整张图片隐藏,箭头显示不出来,帮忙看看问题出在哪
CDC* pDC = GetDC();
CClientDC dc(this); //建立设备上下文对象
CBitmap FootballBMP;
FootballBMP.LoadBitmap(IDB_BITMAP213);
CDC ImageDC;
ImageDC.CreateCompatibleDC(pDC);
CBitmap *pOldImageBMP = ImageDC.SelectObject(&FootballBMP);
TransparentBlt(pDC->m_hDC,0,0,15,15,ImageDC.m_hDC,0,0,15,15,RGB(255,255,255));
ImageDC.SelectObject(pOldImageBMP);