From ea283460f73aed38d4f1791711b444e1bd40c372 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 6 Sep 2009 14:31:25 +0000 Subject: [PATCH] Recognize the buddy text control as part of wxSpinCtrl. This allows the code in wxWindowMSW::HandleCtlColor() to find the correct control when handling the messages from the buddy control and hence setting the colours for wxSpinCtrl works after this change. Closes #1691. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61845 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + include/wx/msw/spinctrl.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 4e78622771..2a841d11e9 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -413,6 +413,7 @@ MSW: - Fix wxTreeCtrl::UnselectItem() in single selection controls. - Allow customizing wxStandardPaths logic for program directory determination. - Use time in wxDateTime <-> SYSTEMTIME conversion (troelsk). +- Setting colours for wxSpinCtrl now works. i18n: diff --git a/include/wx/msw/spinctrl.h b/include/wx/msw/spinctrl.h index 26fb596c73..02d229c748 100644 --- a/include/wx/msw/spinctrl.h +++ b/include/wx/msw/spinctrl.h @@ -90,6 +90,9 @@ public: // process a WM_COMMAND generated by the buddy text control bool ProcessTextCommand(WXWORD cmd, WXWORD id); + // recognize buddy window as part of this control at wx level + virtual bool ContainsHWND(WXHWND hWnd) const { return hWnd == m_hwndBuddy; } + protected: virtual void DoGetPosition(int *x, int *y) const; virtual void DoMoveWindow(int x, int y, int width, int height); -- 2.45.2