The information in this article applies to:
SYMPTOMSWhen you add a stock Text or Caption property to an MFC ActiveX control that subclasses a Combo or List Box, it will not serialize properly. CAUSEWhen a container attempts to read the Text or Caption property for an MFC ActiveX control, the MFC framework calls COleControl::GetText. GetText calls COleControl::InternalGetText. InternalGetText may attempt to get the Text or Caption property from the control with the following call:
In the case of subclassed Combo or List Box control, this call will always
return an empty buffer.
RESOLUTION
It is debatable whether it makes sense to have a Text or Caption property
for a subclassed Combo or List Box. The native Combo and List Box controls
do not respond to the WM_SETTEXT or WM_GETTEXT messages. Therefore, the
problem described above occurs. STATUSThis behavior is by design. MORE INFORMATIONThe Text and Caption properties of an ActiveX control are synonymous. Additional query words:
Keywords : kbole kbMFC kbVC420 kbVC500 kbVC600 |
Last Reviewed: July 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |