X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/01c500af65d6e42b407e850348458e299a824653..b494e2b0082a5464459fbc25abe4c9f46033dac1:/include/wx/msw/control.h diff --git a/include/wx/msw/control.h b/include/wx/msw/control.h index e3669c8c08..574d84a74b 100644 --- a/include/wx/msw/control.h +++ b/include/wx/msw/control.h @@ -70,8 +70,6 @@ public: const wxArrayLong& GetSubcontrols() const { return m_subControls; } - virtual WXHBRUSH MSWControlColor(WXHDC pDC); - protected: // choose the default border for this window virtual wxBorder GetDefaultBorder() const; @@ -118,6 +116,23 @@ protected: // default style for the control include WS_TABSTOP if it AcceptsFocus() virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + // default handling of WM_CTLCOLORxxx + virtual WXHBRUSH MSWControlColor(WXHDC pDC); + + // call this from the derived class MSWControlColor() if you want to show + // the control greyed out + WXHBRUSH MSWControlColorDisabled(WXHDC pDC); + + // call this from the derived class MSWControlColor() if you want to always + // paint the background (as all opaque controls do) + WXHBRUSH MSWControlColorSolid(WXHDC pDC) + { + return MSWControlColorSolid(pDC, GetBackgroundColour()); + } + + // common part of the 3 methods above + WXHBRUSH MSWControlColorSolid(WXHDC pDC, wxColour colBg); + // this is a helper for the derived class GetClassDefaultAttributes() // implementation: it returns the right colours for the classes which // contain something else (e.g. wxListBox, wxTextCtrl, ...) instead of