if ( !bCtrlDown )
{
// this will contain the dialog code of this
- // window and all of its parent windows
+ // window and all of its parent windows in turn
LONG lDlgCode2 = lDlgCode;
- while ( win && !win->IsTopLevel() )
+ while ( win )
{
if ( lDlgCode2 & DLGC_WANTMESSAGE )
{
return false;
}
+ // don't propagate keyboard messages beyond
+ // the first top level window parent
+ if ( win->IsTopLevel() )
+ break;
+
+ win = win->GetParent();
+
lDlgCode2 = ::SendMessage
(
GetHwndOf(win),
0,
0
);
-
- win = win->GetParent();
}
}
else // bCtrlDown