Set HBITMAP and its parameters in one call

To avoid separate calls to SetWidth/Height/Size/Depth functions after calling SetHBITMAP() use newly implemented InitFromHBITMAP() function which allows to set HBITMAP together with its parameters in one call.
This commit is contained in:
Artur Wieczorek
2018-09-11 21:44:56 +02:00
parent 12c44f1c79
commit 97f73acddb
5 changed files with 58 additions and 25 deletions

View File

@@ -201,6 +201,8 @@ public:
public:
void SetHBITMAP(WXHBITMAP bmp) { SetHandle((WXHANDLE)bmp); }
WXHBITMAP GetHBITMAP() const { return (WXHBITMAP)GetHandle(); }
bool InitFromHBITMAP(WXHBITMAP bmp, int width, int height, int depth);
void ResetHBITMAP() { InitFromHBITMAP(NULL, 0, 0, 0); }
void SetSelectedInto(wxDC *dc);
wxDC *GetSelectedInto() const;