怎样生成这样的图象?就是在一个位图中有一些文字。当打开这个图象时,只有文字能看到?其余的背景都看不到?? 怎样生成这样的图象?就是在一个位图中有一些文字。当打开这个图象时,只有文字能看到?其余的背景都看不到??怎样生成这样的图象?就是在一个位图中有一些文字。当打开这个图象时,只有文字能看到?其余的背景都看不到??谢谢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 最简单的办法就是做成ICO文件,ICO文件支持透明背景 在VC中画BITMAP的时候可以指定背景色,如果是XP,直接用TransparentBlt(),最后一个参数指定背景颜色,如果不是XP,则可以用多次Blt,用and和xor操作来实现过滤背景色的方法。下面是摘出来的一段代码,这个代码不能直接用,具体请参考:http://www.codeproject.com/bitmap/membm.asp// create AND mask Draw( bmAnd, 0, 0 ); // create XOR maskbmAnd.Draw( bmXor, 0, 0, 0x220326 ); bmTemp.Create( hDC, NULL, iLeft, iTop, iWidth, iHeight ); //copy hDC contents to temporary// blend the AND and XOR masks into the temporary bitmapbmAnd.Draw(bmTemp, 0, 0, iWidth, iHeight, iSrcLeft, iSrcTop, iSrcWidth, iSrcHeight, SRCAND); bmXor.Draw(bmTemp, 0, 0, iWidth, iHeight, iSrcLeft, iSrcTop, iSrcWidth, iSrcHeight, SRCINVERT); // draw the resulting image to the hDCbmTemp.Draw( hDC, iLeft, iTop, iWidth, iHeight ); C+如何自定义菜单栏样式、界面? 怎么用VC实现邮箱选择登录功能? mfc自动化excel的问题,急求解决!!!! 关于类的大白菜问题~ 请问怎样将窗体的关闭按钮显示出来 今天无聊下拉个呼出外挂的程序但是有点小问题 高精度定时器和QueryPerformanceFrequency VC中如何输出HTML格式的文件~~ 关于directshow抓图问题 如何等待两种不同事件其中之一发生 MDI窗口的拆分问题 如何实现工具栏中图标象IE中一样,当鼠标放上面时突出显示,而且工具栏中图标搞成透明的。
Draw( bmAnd, 0, 0 );
// create XOR mask
bmAnd.Draw( bmXor, 0, 0, 0x220326 );
bmTemp.Create( hDC, NULL, iLeft, iTop, iWidth, iHeight ); //copy hDC contents to temporary
// blend the AND and XOR masks into the temporary bitmap
bmAnd.Draw(bmTemp, 0, 0, iWidth, iHeight, iSrcLeft, iSrcTop, iSrcWidth, iSrcHeight, SRCAND);
bmXor.Draw(bmTemp, 0, 0, iWidth, iHeight, iSrcLeft, iSrcTop, iSrcWidth, iSrcHeight, SRCINVERT);
// draw the resulting image to the hDC
bmTemp.Draw( hDC, iLeft, iTop, iWidth, iHeight );