The TAB key, arrow keys, and accelerator keys do not work as expected when an ActiveX control is the parent window of a modeless dialog box or of a propertysheet window (187988)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2b
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2b
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++ .NET (2003)
This article was previously published under Q187988 SYMPTOMS When an ActiveX control is the parent window of a modeless
dialog box or propertysheet window, the TAB key, arrow keys, and accelerator
keys don't work as expected. The TAB key doesn't move input focus from one
control to another. Pressing the arrow keys or accelerator keys in the modeless
dialog box or propertysheet window has no effect. CAUSE The problem is the ActiveX control doesn't own the message
pump. The message pump is owned by the container application. Therefore, all
the keystroke messages are taken by the container application and not
dispatched to the modeless dialog box or propertysheet window.
The
problem does not occur with a modal dialog box/propertysheet window because the
message pump is owned by the dialog box manager, and it takes care of handling
all keystroke messages. RESOLUTION Install a Windows WH_GETMESSAGE hook for the modeless
dialog box/propertysheet derived class to allow it to intercept keystrokes and
handle accelerators. STATUS This behavior is by design. REFERENCES (c) Microsoft Corporation 1998, All Rights Reserved.
Contributions by Yeong-Kah Tam, Microsoft Corporation.
Modification Type: | Major | Last Reviewed: | 9/7/2005 |
---|
Keywords: | kbcode kbCtrlCreate kbDlg kbprb KB187988 kbAudDeveloper |
---|
|