compatible DC/Bitmap fixes

Ove Kaaven ovehk at ping.uio.no
Sun Dec 2 05:25:57 CST 2001


On Sat, 1 Dec 2001, eric pouech wrote:

> as Marcus reported, the console was only working in black & white
> the cause of the error comes from the following flow
> 
> 1/ GetDC (physical and/or display)
> 2/ CreateCompatibleDC (on DC gotten from 1/)
> 3/ CreateCompatibleBitmap (on DC gotten from 2/)

What you *should* do is to call CreateCompatibleBitmap on the DC you got
from GetDC. That's what all the Windows code I know of does.

> the trouble is as follows :
> - when a mem DC is created, its bits per pixel is always set to 1 

Yes, that's documented Windows behaviour. You need to select a bitmap into
it to change it. No Windows code expects otherwise.





More information about the wine-devel mailing list