diff --git a/include/wx/msw/dib.h b/include/wx/msw/dib.h index 58061449f1..9ae349ba19 100644 --- a/include/wx/msw/dib.h +++ b/include/wx/msw/dib.h @@ -37,9 +37,11 @@ public: wxDIB(int width, int height, int depth) { Init(); (void)Create(width, height, depth); } +#ifdef __WXMSW__ // create a DIB from the DDB wxDIB(const wxBitmap& bmp) { Init(); (void)Create(bmp); } +#endif // __WXMSW__ // create a DIB from the Windows DDB wxDIB(HBITMAP hbmp) @@ -53,7 +55,9 @@ public: // same as the corresponding ctors but with return value bool Create(int width, int height, int depth); +#ifdef __WXMSW__ bool Create(const wxBitmap& bmp) { return Create(GetHbitmapOf(bmp)); } +#endif bool Create(HBITMAP hbmp); bool Load(const wxString& filename); diff --git a/src/msw/dib.cpp b/src/msw/dib.cpp index 00faac6a4e..b12baf0f83 100644 --- a/src/msw/dib.cpp +++ b/src/msw/dib.cpp @@ -575,7 +575,7 @@ HGLOBAL wxDIB::ConvertFromBitmap(HBITMAP hbmp) wxPalette *wxDIB::CreatePalette() const { // GetDIBColorTable not available in eVC3 -#if defined(_WIN32_WCE) && _WIN32_WCE < 400 +#if !defined(__WXMSW__) || defined(_WIN32_WCE) && _WIN32_WCE < 400 return NULL; #else wxCHECK_MSG( m_handle, NULL, wxT("wxDIB::CreatePalette(): invalid object") );