The information in this article applies to:
SYMPTOMSAn ATL ActiveX control based on one of the common controls may not appear in an ActiveX control container. CAUSE
The ATL Object Wizard doesn't add a call to InitCommonControls() when you
insert an ActiveX control based on a common control. The call to
InitCommonControls() is required if you use any of the common controls in
your ATL ActiveX control.
RESOLUTIONThis problem has been fixed in Visual C++ 6.0. The ATL Object Wizard adds a call to InitCommonControls() for you. For richedit controls, the ATL Object Wizard calls LoadLibrary() and FreeLibrary() on Riched32.dll. If you're using Visual C++ 5.0 or earlier, just add the call to InitCommonControls() before calling Create() for the common control. The Wizard usually calls Create() in OnCreate():
For the richedit control, you'll need to load Riched32.dll and unload it:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Microsoft Visual C++, 6.0. MORE INFORMATIONContainers such as ActiveX Control Test Container in MFC 4.2 already call InitCommonControls() so this problem does not occur. Additional query words: ocx RichEdit SysListView32 SysTreeView32 SysAnimate32 SysTabControl32 rich edit listview treeview animate tab tabcontrol tooltip header hotkey image list progress slider spin buttton
Keywords : kbwizard kbActiveX kbATL210 kbATL210bug kbCOMt kbCtrlCreate kbVC500bug kbVC600fix kbATL300 kbATL300fix kbGrpMFCATL |
Last Reviewed: November 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |