Draw the selected bitmap correctly in wxMSW buttons.
Clear the previously drawn bitmap before drawing the new one. Closes #12550. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -27,3 +27,4 @@ wxMSW:
|
|||||||
|
|
||||||
- Improve wxMimeTypesManager open command detection (Eric Jensen).
|
- Improve wxMimeTypesManager open command detection (Eric Jensen).
|
||||||
- Make wxFILTER_INCLUDE_LIST in wxTextValidator actually usable.
|
- Make wxFILTER_INCLUDE_LIST in wxTextValidator actually usable.
|
||||||
|
- Fix handling of selected images in wxBitmapButton (Artur Wieczorek).
|
||||||
|
@@ -1175,7 +1175,13 @@ bool wxAnyButton::MSWOnDraw(WXDRAWITEMSTRUCT *wxdis)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// clear the background (and erase any previous bitmap)
|
||||||
|
COLORREF colBg = wxColourToRGB(GetBackgroundColour());
|
||||||
|
AutoHBRUSH hbrushBackground(colBg);
|
||||||
|
FillRect(hdc, &rectBtn, hbrushBackground);
|
||||||
|
}
|
||||||
|
|
||||||
// draw the image, if any
|
// draw the image, if any
|
||||||
if ( m_imageData )
|
if ( m_imageData )
|
||||||
|
Reference in New Issue
Block a user