PRB: Windowless ATL Control Does Not Receive Focus Messages in Internet Explorer (318034)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 5
- Microsoft Internet Explorer (Programming) 5.01
- Microsoft Internet Explorer (Programming) 5.5
This article was previously published under Q318034 SYMPTOMS
When you run Active Template Library (ATL) windowless ActiveX controls in Internet Explorer, you receive the WM_SETFOCUS message, but you do not receive the WM_KILLFOCUS message when you press the TAB key to move out of the control or out of the application.
CAUSE
By design, Internet Explorer forwards the WM_SETFOCUS message to the windowless ActiveX control, but it does not forward the WM_KILLFOCUS message. The specifications for windowless ActiveX controls (in the IOleInPlaceObjectWindowless::OnWindowMessage method documentation) state that windowless ActiveX control containers do not have to forward either of these messages.
RESOLUTION
You can handle the state changes if you implement the following methods: - IOleInPlaceObject::UIDeactivate
- IOleObject::DoVerb
- IOleInPlaceActiveObject::OnFrameWindowActivate
REFERENCES
For additional information, visit the following MSDN Web site:
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbCtrl kbCtrlCreate kbprb KB318034 kbAudDeveloper |
---|
|