The information in this article applies to:
SYMPTOMSThe DDX function DDX_CBString does not work correctly under Win32s for combo boxes that use the drop list style. If you try to use DDX to retrieve the string associated with the static control of a drop list style combo box under Win32s, an empty string is returned. CAUSEThis problem is the result of an improperly sign extended return value from the Windows SDK GetWindowTextLength function. The MFC function DDX_CBString uses GetWindowTextLength to try to determine how many characters to copy from the edit control of a combo box with a drop down style or the static control of a combo box with a drop list style. The GetWindowTextLength function fails to retrieve a valid text length for a combo box with a drop list style under Win32s. When GetWindowTextLength is called for a combo box with a drop list style under Win32s, a value of 0xFFFF is returned. Because this return value isn't properly sign extended to 0xFFFFFFFF, the DDX_CBString function doesn't work correctly. RESOLUTION
It is possible to work around this problem by providing your own
implementation of the DDX_CBString function for the class that has the
DDX_CBString call in its DoDataExchange function. If you provide your own
DDX_CBString member function, it will override the standard MFC
DDX_CBString function. To provide your own version of DDX_CBString follow
these steps:
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this problem and will
post new information here in the Microsoft Knowledge Base as it becomes
available. MORE INFORMATIONSample CodeThe following is a sample of an override of the DDX_CBString function for the class called CMyTryDlg:
Additional query words:
Keywords : kbprg kbui kbnokeyword kbMFC kbVC kbWin32s |
Last Reviewed: July 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |