X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f51a6f6a0c11f2d5ce58bcb858f5dfa1c27299a5..dd107c50be43e8d4dbdba20df162faf119a3781c:/src/msw/spinctrl.cpp?ds=sidebyside diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 5e23013cd8..e4cef9f9ac 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -98,7 +98,12 @@ LRESULT APIENTRY _EXPORT wxBuddyTextWndProc(HWND hwnd, if (!(::IsWindow(hwnd) && ((wxSpinCtrl *)::GetWindowLong(hwnd, GWL_USERDATA)) == spin)) return 0; break; + + case WM_GETDLGCODE: + // we want to get WXK_RETURN in order to generate the event for it + return DLGC_WANTCHARS; } + return ::CallWindowProc(CASTWNDPROC spin->GetBuddyWndProc(), hwnd, message, wParam, lParam); } @@ -248,9 +253,6 @@ bool wxSpinCtrl::Create(wxWindow *parent, if ( style & wxCLIP_SIBLINGS ) msStyle |= WS_CLIPSIBLINGS; - // we want to get WXK_RETURN in order to generate the event for it - m_lDlgCode = DLGC_WANTCHARS; - // create the text window m_hwndBuddy = (WXHWND)::CreateWindowEx (