When a Microsoft Foundation Classes (MFC) ActiveX control
appears in an IFRAME that is partially covered by another IFRAME in the same
Hypertext Markup Language (HTML) page, the ActiveX control receives unnecessary
WM_PAINT messages. The unnecessary WM_PAINT messages occur when other parts of the HTML page are updated.
MFC ActiveX controls include dual windows: a child window
and a parent window. The parent window is used for notification. If the IFRAME
that contains an MFC ActiveX control is completely covered in one dimension,
the parent window is resized to the size of the control (including the clipped
portion that is outside the boundaries of the IFRAME). The parent window
returns to the clip area size whenever the page is updated. The resizing
generates the extra WM_PAINT messages.
NOTE: Use the class ID (CLSID) from the .odl file of the ActiveX
control. One of the IFRAMEs for Simple.htm is Mfctest.htm.
Double-click Simple.htm, and then type text in the text
area. Every time you type, the ActiveX control flickers. Additionally, every
time the top frame window is resized, the ActiveX control flickers.
To see how the layout affects the problem, modify the top
attributes of one of the IFRAMEs to a value other than 300. Make sure that the
IFRAME is not completely covered. Refresh or resize the page. Notice that the
frame does not flicker.
NOTE: This problem occurs if one of the dimensions (the width or the
height) of the IFRAME that contains the MFC ActiveX control is completely
covered by the other IFRAME.