作者Arc9999 (.....)
站内Programming
标题[请益] 有个DC的操作问题
时间Tue Oct 23 15:13:06 2007
我有一个小程式,在BitBlt那一行却总是失败,我想不出
原因,请问有熟悉DC操作的人能看出失败的原因是什麽吗?
CDC * pdc;
CDC dcCompatible;
CDC dcCompatible2;
int dWidth;
int dHeight;
pdc=this->GetDC();
dWidth=pdc->GetDeviceCaps(HORZRES);
dHeight=pdc->GetDeviceCaps(VERTRES);
//在下面这两行都回传成功
pdc->CreateCompatibleDC(&dcCompatible);
pdc->CreateCompatibleDC(&dcCompatible2);
//在这一行回传失败?
BitBlt(dcCompatible2,0,0,dWidth,dHeight,dcCompatible,0,0,SRCCOPY);
dcCompatible.DeleteDC();
dcCompatible2.DeleteDC();
pdc->DeleteDC();
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 210.66.243.5