another fix for enter processing in wxSpinCtrl
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10440 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -98,7 +98,12 @@ LRESULT APIENTRY _EXPORT wxBuddyTextWndProc(HWND hwnd,
|
|||||||
if (!(::IsWindow(hwnd) && ((wxSpinCtrl *)::GetWindowLong(hwnd, GWL_USERDATA)) == spin))
|
if (!(::IsWindow(hwnd) && ((wxSpinCtrl *)::GetWindowLong(hwnd, GWL_USERDATA)) == spin))
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
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(),
|
return ::CallWindowProc(CASTWNDPROC spin->GetBuddyWndProc(),
|
||||||
hwnd, message, wParam, lParam);
|
hwnd, message, wParam, lParam);
|
||||||
}
|
}
|
||||||
@@ -248,9 +253,6 @@ bool wxSpinCtrl::Create(wxWindow *parent,
|
|||||||
if ( style & wxCLIP_SIBLINGS )
|
if ( style & wxCLIP_SIBLINGS )
|
||||||
msStyle |= WS_CLIPSIBLINGS;
|
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
|
// create the text window
|
||||||
m_hwndBuddy = (WXHWND)::CreateWindowEx
|
m_hwndBuddy = (WXHWND)::CreateWindowEx
|
||||||
(
|
(
|
||||||
|
Reference in New Issue
Block a user