本文介绍了901210-CreateCompatibleDC如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在以下代码中:
in the following code:
CDC memDC;
memDC.CreateCompatibleDC(NULL);
CBitmap bmp;
bmp.CreateCompatibleBitmap(&memDC, 100, 100);
memDC.SelectObject(&bmp);
memDC获得单色DC.为什么?
我希望CreateCompatibleDC可以创建像屏幕一样的彩色DC!
如果我将代码更改为:
memDC gets a monochrome DC. why?
i expect CreateCompatibleDC creates a color DC like the screen!
if i change the code into:
CDC memDC;
memDC.CreateCompatibleDC(NULL);
CBitmap bmp;
CClientDC dc(NULL);
bmp.CreateCompatibleBitmap(&dc, 100, 100);
memDC.SelectObject(&bmp);
memDC获得彩色DC!
你怎么形容它?
thx
memDC gets a color DC!
how can u describe it?
thx
推荐答案
这篇关于901210-CreateCompatibleDC如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!