X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cbea3ec6ae2cd8c8d477c6f04a09ca8a1fa1ab96..1d12c6e2be99ae9e7d9a75ba2540ebec7449c92e:/include/wx/msw/bitmap.h diff --git a/include/wx/msw/bitmap.h b/include/wx/msw/bitmap.h index e8e27aba33..205370f459 100644 --- a/include/wx/msw/bitmap.h +++ b/include/wx/msw/bitmap.h @@ -58,7 +58,7 @@ public: #ifdef wxNEEDS_CHARPP wxBitmap(char** data) { - *this = wxBitmap(wx_const_cast(const char* const*, data)); + *this = wxBitmap(const_cast(data)); } #endif @@ -73,7 +73,8 @@ public: // // NB: this ctor will create a DIB for 24 and 32bpp bitmaps, use ctor // taking a DC argument if you want to force using DDB in this case - wxBitmap(int width, int height, int depth = -1); + wxBitmap(int width, int height, int depth = -1) { (void)Create(width, height, depth); } + wxBitmap(const wxSize& sz, int depth = -1) { (void)Create(sz, depth); } // Create a bitmap compatible with the given DC wxBitmap(int width, int height, const wxDC& dc); @@ -137,6 +138,9 @@ public: #endif virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); + virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) + { return Create(sz.GetWidth(), sz.GetHeight(), depth); } + virtual bool Create(int width, int height, const wxDC& dc); virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1); virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); @@ -170,10 +174,8 @@ public: void SetHBITMAP(WXHBITMAP bmp) { SetHandle((WXHANDLE)bmp); } WXHBITMAP GetHBITMAP() const { return (WXHBITMAP)GetHandle(); } -#ifdef __WXDEBUG__ void SetSelectedInto(wxDC *dc); wxDC *GetSelectedInto() const; -#endif // __WXDEBUG__ protected: virtual wxGDIImageRefData *CreateData() const;