主要是用 BOOL BitBlt( HDC hdcDest, // handle to destination DC int nXDest, // x-coord of destination upper-left corner int nYDest, // y-coord of destination upper-left corner int nWidth, // width of destination rectangle int nHeight, // height of destination rectangle HDC hdcSrc, // handle to source DC int nXSrc, // x-coordinate of source upper-left corner int nYSrc, // y-coordinate of source upper-left corner DWORD dwRop // raster operation code );这个API函数当然,还有其他的如StretchBlt, TransparentBlt等 也可能会用到。
整块的话,你在代码中就会麻烦些。
建议你还是分开一个一个,简单点。将图标在Resource中导入BITMAP,记得要命名好
在代码中使用 LoadBitmap()获取位图,剩下就是贴图的事情了。
BOOL BitBlt(
HDC hdcDest, // handle to destination DC
int nXDest, // x-coord of destination upper-left corner
int nYDest, // y-coord of destination upper-left corner
int nWidth, // width of destination rectangle
int nHeight, // height of destination rectangle
HDC hdcSrc, // handle to source DC
int nXSrc, // x-coordinate of source upper-left corner
int nYSrc, // y-coordinate of source upper-left corner
DWORD dwRop // raster operation code
);这个API函数当然,还有其他的如StretchBlt, TransparentBlt等 也可能会用到。
我在对话框上绘图,但是当我的对话框移动到windows桌面之外,然后再回来,则图像就消失了
不知道怎么解决啊??
谢谢