Disable creation of wxDIB from wxBitmap in non-wxMSW ports.
wxDIB can now be used with wxGTK under Windows, i.e. when not using wxMSW version of wxBitmap but it can't be created from wxBitmap then as it doesn't have a corresponding HBITMAP. Simply disable this functionality when not using wxMSW. Closes #14414. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
598fe99d56
commit
954fd05108
@ -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);
|
||||
|
||||
|
@ -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") );
|
||||
|
Loading…
Reference in New Issue
Block a user