PRB: Accelerator Keys Fail with ATL Control on a VB UserControl (232624)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q232624 SYMPTOMS
If an ActiveX Template Library (ATL) control created with Visual C++ 6.0 is placed directly on a Visual Basic form, the accelerator keys will work correctly. However, if the control is first placed inside a Visual Basic Usercontrol and the usercontrol is then placed on a form, the accelerator keys will not work.
CAUSE
This is due to the ATL control not giving the composite control the chance to handle the accelerator keys.
RESOLUTION
Explicitly forward the message to the composite control.
REFERENCES
For additional information on problems using ATL controls on Visual Basic forms, please see the following articles in the Microsoft Knowledge Base:
230326 PRB: Validate Event does not fire when changing focus with mouse to ATL control
187644 ATL Controls Fail to Recognize Default Button on VB Form
179696 PRB: Focus and Tab Issues with ATL Subclassed Edit Control
| Modification Type: | Major | Last Reviewed: | 5/12/2003 |
|---|
| Keywords: | kbCtrlCreate kbprb kbwizard KB232624 |
|---|
|