#endif
#ifndef WX_PRECOMP
-#include "wx/bmpbuttn.h"
+ #include "wx/bmpbuttn.h"
#endif
#include "wx/msw/private.h"
y1 ++;
}
- ::BitBlt(hDC, x1, y1, bitmap->GetWidth(), bitmap->GetHeight(), memDC, 0, 0, SRCCOPY);
+ wxMask *mask = bitmap->GetMask();
+ if ( mask )
+ {
+ ::MaskBlt(hDC, x1, y1, bitmap->GetWidth(), bitmap->GetHeight(), // dst
+ memDC, 0, 0, // src
+ (HBITMAP)mask->GetMaskBitmap(), 0, 0, // mask
+ MAKEROP4(SRCPAINT, SRCCOPY));
+ }
+ else
+ {
+ ::BitBlt(hDC, x1, y1, bitmap->GetWidth(), bitmap->GetHeight(), // dst
+ memDC, 0, 0, // src
+ SRCCOPY);
+ }
if ( (state & ODS_DISABLED) && (GetWindowStyleFlag() & wxBU_AUTODRAW) )
DrawButtonDisable( (WXHDC) hDC, lpDIS->rcItem.left, lpDIS->rcItem.top, lpDIS->rcItem.right, lpDIS->rcItem.bottom, TRUE ) ;
DeleteObject(brushFace);
}
-#define FOCUS_MARGIN 6
+// VZ: should be at the very least less than wxDEFAULT_BUTTON_MARGIN
+#define FOCUS_MARGIN 3
void wxBitmapButton::DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel )
{