X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78a054f6677cfeaa8a1f78c8de4507ea50af379c..cbc82a22cc4cb21fe3ca705ed5da5644cef90e3a:/src/msw/dib.cpp?ds=sidebyside diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index 66ebda4954..ee17d5d2b1 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -30,15 +30,16 @@ #pragma hdrstop #endif +#if wxUSE_WXDIB + #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/log.h" + #include "wx/intl.h" + #include "wx/bitmap.h" + #include "wx/image.h" #endif //WX_PRECOMP -#if wxUSE_WXDIB - -#include "wx/bitmap.h" -#include "wx/intl.h" #include "wx/file.h" #include @@ -48,7 +49,6 @@ #include #endif -#include "wx/image.h" #include "wx/msw/dib.h" #ifdef __WXWINCE__ @@ -566,7 +566,7 @@ HGLOBAL wxDIB::ConvertFromBitmap(HBITMAP hbmp) return NULL; } - if ( !ConvertFromBitmap((BITMAPINFO *)(void *)GlobalPtr(hDIB), hbmp) ) + if ( !ConvertFromBitmap((BITMAPINFO *)(void *)GlobalPtrLock(hDIB), hbmp) ) { // this really shouldn't happen... it worked the first time, why not // now? @@ -800,4 +800,3 @@ wxImage wxDIB::ConvertToImage() const #endif // wxUSE_IMAGE #endif // wxUSE_WXDIB -