Why would passing a compatible DC and the DC the compatible one is based on to CreateCompatibleBitmap()
give different results?
This one creates a monochrome bitmap:
CDC dcMem;
dcMem.CreateCompatibleDC(mydc);
destBitmap->CreateCompatibleBitmap(&dcMem, rect.Width(), rect.Height());
CBitmap* pBmpOld = dcMem.SelectObject (destBitmap);
// ... Draw on to the DC ....
dcMem.SelectObject (pBmpOld);
This one creates the correct color bitmap:
CDC dcMem;
dcMem.CreateCompatibleDC(mydc);
destBitmap->CreateCompatibleBitmap (mydc, rect.Width(), rect.Height());
CBitmap* pBmpOld = dcMem.SelectObject (destBitmap);
// ... Draw on to the DC ....
dcMem.SelectObject (pBmpOld);
TIA!!
As per the comments, have a look at the
CreateCompatibleBitmap
documentation: