Refactor owner drawn buttons drawing code in wxMSW.

Move it from wxCheckBox to wxControl to allow reusing this code in other
classes, notably wxRadioButton in the upcoming commits.

See #10137.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-05-04 22:13:07 +00:00
parent 34d3e680c8
commit 3fc6738025
4 changed files with 114 additions and 97 deletions

View File

@@ -124,6 +124,11 @@ protected:
// Look in our GetSubcontrols() for the windows with the given ID.
virtual wxWindow *MSWFindItem(long id, WXHWND hWnd) const;
// For ownerdraw buttons
virtual bool MSWOwnerDrawnButton(const DRAWITEMSTRUCT *dis, int flags, bool isFocused);
virtual void MSWDrawButtonBitmap(wxWindow *WXUNUSED(win), wxDC& WXUNUSED(dc),
const wxRect& WXUNUSED(rect), int WXUNUSED(flags)) {}
// for controls like radiobuttons which are really composite this array
// holds the ids (not HWNDs!) of the sub controls
wxArrayLong m_subControls;