git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19747
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bits = (char *)pbmih + sizeof(*pbmih) + numColors*sizeof(RGBQUAD);
}
bits = (char *)pbmih + sizeof(*pbmih) + numColors*sizeof(RGBQUAD);
}
- HDC tmphdc = hdc;
- if (!hdc) tmphdc = ScreenHDC();
HBITMAP hbmp = ::CreateDIBitmap
(
HBITMAP hbmp = ::CreateDIBitmap
(
- tmphdc, // create bitmap compatible with this DC
+ hdc ? hdc // create bitmap compatible
+ : (HDC) ScreenHDC(), // with this DC
pbmih, // used to get size &c
CBM_INIT, // initialize bitmap bits too
bits, // ... using this data
pbmih, // used to get size &c
CBM_INIT, // initialize bitmap bits too
bits, // ... using this data