only request Enter key for the spin control if it has wxTE_PROCESS_ENTER style [partial backport of r55617 from trunk]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@55622 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-09-14 19:56:14 +00:00
parent eeddd5583c
commit 443fb14a30

View File

@@ -176,8 +176,20 @@ LRESULT APIENTRY _EXPORT wxBuddyTextWndProc(HWND hwnd,
break;
case WM_GETDLGCODE:
// we want to get WXK_RETURN in order to generate the event for it
return DLGC_WANTALLKEYS;
if ( spin->HasFlag(wxTE_PROCESS_ENTER) )
{
long dlgCode = ::CallWindowProc
(
CASTWNDPROC spin->GetBuddyWndProc(),
hwnd,
message,
wParam,
lParam
);
dlgCode |= DLGC_WANTMESSAGE;
return dlgCode;
}
break;
}
return ::CallWindowProc(CASTWNDPROC spin->GetBuddyWndProc(),