PRB: ActiveX Control Painting Problems in Visual C++ 4.2Last reviewed: February 17, 1998Article ID: Q154166 |
The information in this article applies to:
Microsoft Visual C++, 32-bit Edition, version 4.2, 5.0
SYMPTOMSThe ActiveX (OLE) Control may not paint correctly if it was built using Visual C++ 4.2. Two known issues include controls not repainting when resized, and control child windows not being repainted. Other painting problems have been observed when subclassing native Windows controls.
CAUSEThis behavior is caused by changes to COleControl::OnPaint which add optimizations to improve performance.
RESOLUTIONCOleControl now includes a method, GetControlFlags, to control how painting will be handled in an ActiveX control. Removing the fastBeginPaint flag from the bit field returned by GetControlFlags will cause your ActiveX control to use the same OnPaint code found in Visual C++ 4.1
STATUSThis behavior is by design.
MORE INFORMATION
Sample CodeDWORD CMyOleControl::GetControlFlags () { return COleControl::GetControlFlags() & ~fastBeginPaint;}
REFERENCESFor an explanation of the GetControlFlags return values, see the documentation in Books on Line.
|
Additional query words: OnPaint GetControlFlags OLE 96 ocx
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |