BUG: Enabling Accelerator Keys in Visual Basic ActiveX Controls (189779)
The information in this article applies to:
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
This article was previously published under Q189779 SYMPTOMS
Using an ActiveX control (or UserControl) that is created with Visual Basic
5.0 in an MFC container application, the accelerator keys (or access keys)
defined for the child windows in the ActiveX control do not work as
expected.
CAUSE
Because both Visual Basic and MFC provide different mnemonic handling
implementations, Visual Basic needs to change the UserControl's accelerator
tables in order for the accelerator keys to work properly in an MFC
container. For more information, see the REFERENCES section of this
article.
RESOLUTION
The workaround is to call the EnumChildWindows() API to enumerate all the
child windows of the ActiveX control from the container application. Then,
determine the mnemonic character key of each child window based on the HWND
that is passed to the callback function in the EnumChildWindows()call.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this bug and will post
new information here in the Microsoft Knowledge Base as it becomes
available.
REFERENCES
For information about defining access keys for a control, please refer to
the Online Help in Visual Basic.
For additional information, please see the following article in the
Microsoft Knowledge Base:
145698 PRB: Mnemonic Differences Between MFC 4.0 and Visual Basic 4.0
(c) Microsoft Corporation 1997. All Rights Reserved.
Contributions by Yeong-Kah Tam, Microsoft Corporation
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | kbbug KB189779 |
---|
|