X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2e8005ccaf7663d3b3abc643547ce18d74fd5290..342751763793b5cdad252d731aac0618d0674e5b:/src/msw/bmpbuttn.cpp diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index c7d8dd076f..2cee20c982 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -39,7 +39,10 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit { m_buttonBitmap = bitmap; SetName(name); + +#if wxUSE_VALIDATORS SetValidator(validator); +#endif // wxUSE_VALIDATORS parent->AddChild(this); @@ -172,6 +175,9 @@ bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item) } BOOL ok; + + // no MaskBlt() under Win16 +#ifdef __WIN32__ wxMask *mask = bitmap->GetMask(); if ( mask ) { @@ -196,6 +202,7 @@ bool wxBitmapButton::MSWOnDraw(WXDRAWITEMSTRUCT *item) ::DeleteObject(hbrBackground); } else +#endif // Win32 { ok = ::BitBlt(hDC, x1, y1, wBmp, hBmp, // dst memDC, 0, 0, // src