X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aa44b2611555154a92fb02c9193eed599319bea4..7124df9b59f2627c083b1fecaaa3e93c7088e3d0:/src/msw/window.cpp?ds=sidebyside diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 4193250a77..84dc12f4b7 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -71,6 +71,10 @@ #include "wx/caret.h" #endif // wxUSE_CARET +#if wxUSE_SPINCTRL + #include "wx/spinctrl.h" +#endif // wxUSE_SPINCTRL + #include "wx/intl.h" #include "wx/log.h" @@ -2317,7 +2321,7 @@ void wxWindow::MSWDetachWindowMenu() continue; } - if ( wxStrcmp(buf, wxT("&Window")) == 0 ) + if ( wxStrcmp(buf, _("&Window")) == 0 ) { if ( !::RemoveMenu(hMenu, i, MF_BYPOSITION) ) { @@ -3227,6 +3231,17 @@ bool wxWindow::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control) return GetEventHandler()->ProcessEvent(event); } +#if wxUSE_SPINCTRL + else + { + // the text ctrl which is logically part of wxSpinCtrl sends WM_COMMAND + // notifications to its parent which we want to reflect back to + // wxSpinCtrl + wxSpinCtrl *spin = wxSpinCtrl::GetSpinForTextCtrl(control); + if ( spin && spin->ProcessTextCommand(cmd, id) ) + return TRUE; + } +#endif // wxUSE_SPINCTRL return FALSE; }