Don't discard all current input processing flags in response to WM_GETDLGCODE

Some current input processing flags, like DLGC_HASSETSEL, should be retained because they are in use (in wxWindowMSW::SetFocusFromKbd() for instance).

Closes #17945.
This commit is contained in:
Artur Wieczorek
2017-09-06 12:19:13 +02:00
parent 51e7994cff
commit 52d6b0ae85
2 changed files with 5 additions and 1 deletions

View File

@@ -2969,8 +2969,10 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
case WM_GETDLGCODE:
if ( !IsOfStandardClass() || HasFlag(wxWANTS_CHARS) )
{
// Get current input processing flags to retain flags like DLGC_HASSETSEL, etc.
rc.result = MSWDefWindowProc(WM_GETDLGCODE, 0, 0);
// we always want to get the char events
rc.result = DLGC_WANTCHARS;
rc.result |= DLGC_WANTCHARS;
if ( HasFlag(wxWANTS_CHARS) )
{
@@ -2980,6 +2982,7 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result,
DLGC_WANTALLKEYS;
}
// Message is marked as processed so MSWDefWindowProc() will not be called once more.
processed = true;
}
//else: get the dlg code from the DefWindowProc()