From 4b1f929cc3421e43409f7d62260bf9ba0ffc75ab Mon Sep 17 00:00:00 2001 From: Chris Elliott Date: Mon, 24 Mar 2003 12:47:41 +0000 Subject: [PATCH] fix bug in Borland (bcc32 really hates ?) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19747 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/dib.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index 5cd30f4f41..92db7b427d 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -299,11 +299,11 @@ HBITMAP wxDIB::ConvertToBitmap(const BITMAPINFO *pbmi, HDC hdc, void *bits) bits = (char *)pbmih + sizeof(*pbmih) + numColors*sizeof(RGBQUAD); } - HDC tmphdc = hdc; - if (!hdc) tmphdc = ScreenHDC(); + 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 -- 2.50.0