diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 8037b29d9d..40793fa535 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -2261,9 +2261,13 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg) wxWindow *win = this; if ( !bCtrlDown ) { + // this will contain the dialog code of this + // window and all of its parent windows + LONG lDlgCode2 = lDlgCode; + while ( win && !win->IsTopLevel() ) { - if ( lDlgCode & DLGC_WANTMESSAGE ) + if ( lDlgCode2 & DLGC_WANTMESSAGE ) { // as it wants to process Enter itself, // don't call IsDialogMessage() which @@ -2271,6 +2275,14 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg) return false; } + lDlgCode2 = ::SendMessage + ( + GetHwndOf(win), + WM_GETDLGCODE, + 0, + 0 + ); + win = win->GetParent(); } }