bits = (char *)pbmih + sizeof(*pbmih) + numColors*sizeof(RGBQUAD);
}
-
+ HDC tmphdc = hdc;
+ if (!hdc) tmphdc = ScreenHDC();
HBITMAP hbmp = ::CreateDIBitmap
(
- hdc ? hdc // create bitmap compatible
- : ScreenHDC(), // with this DC
+ tmphdc, // create bitmap compatible with this DC
pbmih, // used to get size &c
CBM_INIT, // initialize bitmap bits too
bits, // ... using this data