Add wxTextEntry::ClickDefaultButtonIfPossible() to wxMSW

Factor out this function from wxTextCtrl to allow its reuse in
wxComboBox in the upcoming commit.

No real changes, this is a pure refactoring.
This commit is contained in:
Vadim Zeitlin
2019-07-14 01:31:45 +02:00
parent 4bd78b06a0
commit 8746da90fe
3 changed files with 17 additions and 3 deletions

View File

@@ -2191,10 +2191,9 @@ wxTextCtrl::MSWHandleMessage(WXLRESULT *rc,
if ( nMsg == WM_CHAR &&
!processed &&
HasFlag(wxTE_PROCESS_ENTER) &&
wParam == VK_RETURN &&
!wxIsAnyModifierDown() )
wParam == VK_RETURN )
{
MSWClickButtonIfPossible(MSWGetDefaultButtonFor(this));
ClickDefaultButtonIfPossible();
processed = true;
}