The information in this article applies to:
SYMPTOMSOn the Macintosh, the combo box messages CB_GETTOPINDEX and CB_SETTOPINDEX fail and always return zero (0). CAUSEThere are no message handlers for these messages in the combo-box window procedure in the Windows Portability Library. RESOLUTIONObtain a pointer to the list box portion of the combo box, and use LB_GETTOPINDEX and LB_SETTOPINDEX instead. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATIONThe combo-box control is composed of an edit control and a list-box control. For additional information about combo boxes, please see the following article in the Microsoft Knowledge Base: Q65881 INFO: The Parts of a Windows Combo Box and How They RelateOn the Intel side, the edit control is the first child of the combo box. For a simple combo box, the Macintosh has the list-box control as the first control. The window handle to the list box can be obtained using GetWindow. Once a valid handle is obtained, using the LB_GETTOPINDEX and LB_SETTOPINDEX messages provides the same functionality as CB_GETTOPINDEX and CB_SETTOPINDEX. The sample code below shows the MFC implementation: Sample Code
REFERENCES(c) Microsoft Corporation 1999, All Rights Reserved. Contributions by Adam Kim, Microsoft Corporation. Additional query words: Macintosh CB_GETTOPINDEX CB_SETTOPINDEX combobox listbox
Keywords : kbcode kbMAC kbMFC kbVC kbVC400bug kbDSupport MacPrgIss |
Last Reviewed: December 3, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |