FIX: ATL Controls Don't Appear in IE When Initially Downloaded (191127)
The information in this article applies to:
- Microsoft Internet Explorer (Programming) 4.0
- Microsoft Internet Explorer (Programming) 4.01
- The Microsoft Active Template Library (ATL) 2.0, when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.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
- The Microsoft Active Template Library (ATL) 2.1, when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.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
- The Microsoft Active Template Library (ATL) 3.0, when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.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 Q191127 SYMPTOMS
If an ActiveX Template Library (ATL) control is downloaded from a Web page,
the ATL control may not appear initially. Clicking on the Refresh button in
Internet Explorer causes the control to appear.
CAUSE
This is a bug in Internet Explorer. It is not calling the control's
IViewObject::Draw() function after the control is downloaded and
registered.
RESOLUTION
Force the control to redraw itself when it is inplace-activated. You can do
this by overriding the DoVerbInPlaceActivate() function in your CComControl-
derived class:
HRESULT DoVerbInPlaceActivate(LPCRECT prcPosRect, HWND hwndParent)
{
HRESULT hr =
IOleObjectImpl<CMyControl>::DoVerbInPlaceActivate(prcPosRect,
hwndParent);
FireViewChange();
return hr;
}
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug has been corrected in Visual
C++, 6.0.
Modification Type: | Major | Last Reviewed: | 6/28/2001 |
---|
Keywords: | kbbug KB191127 |
---|
|