0
我在CE BltBit中从先前创建的兼容的hdc到设备的hdc有问题。ImageList和BltBit - ting
下面的代码工作:
hdc = pdis->hDC;
FillRect(hdc, &(pdis->rcItem), (HBRUSH)GetStockObject(BLACK_BRUSH));
ImageList_Draw(himl, imageIndex, hdc, 15 , 30, ILD_NORMAL);
但是下面只绘制黑色矩形,并且不把图像放在上面。
hdc = pdis->hDC;
hdcmem = CreateCompatibleDC(hdc);
FillRect(hdc, &(pdis->rcItem), (HBRUSH)GetStockObject(BLACK_BRUSH));
ImageList_Draw(himl, imageIndex, hdcmem, 0 , 0, ILD_NORMAL);
BitBlt(hdc, 15, 30, 130, 100, hdcmem, 0, 0, SRCCOPY);
任何想法最受欢迎。
问候 Ë
哈哈..阿瓦尔你是死的权利。谢谢。我确实认为DC背后有一块内存块。你已经回答了我脑海中曾经有过的其他一些小问题。再次感谢。 – EndsOfInvention 2009-10-20 11:55:23