The information in this article applies to:
SUMMARY
In the Microsoft Windows graphical environment, the storage capacity of a
list box or combo box is limited by the total amount of text. Each item is
stored in memory as a NULL-terminated string.
MORE INFORMATION
An owner-draw list box or owner-draw combo box is limited to 64K of data
storage, as are regular (nonowner draw) list boxes and combo boxes. Because
the application manages the text when the list box or combo box do not have
the LBS_HASSTRINGS or CBS_HASSTRINGS styles, each item in an owner-draw
list box or owner-draw combo box require 8 bytes, 4 of which store the
application-supplied 32-bit item-identifier value.
(64K segment - 256 bytes) / (8 bytes per item)NOTE: In a list box with the LBS_HASSTRINGS style or combo box with the CBS_HASSTRINGS style, the text pointed to by the pointer passed in the lParam of LB_ADDSTRING or CB_ADDSTRING (or LB_INSERTSTRING or CB_INSERTSTRING) is stored in the list box's or combo box's storage area. An additional 32-bit storage value can be associated with each item with the LB_SETITEMDATA or CB_SETITEMDATA styles. When the LBS_HASSTRINGS or CBS_HASSTRINGS styles are not present, Windows no longer stores text for the list box or combo box. Instead of storing the text pointed to by the lParam of LB_ADDSTRING or CB_ADDSTRING (or LB_INSERTSTRING or CB_INSERTSTRING), only the 32-bit value itself is stored, thus dramatically reducing the needed storage. When the owner-draw list box or owner-draw combo box receive the WM_DRAWITEM message, it is up to the drawing routine to interpret the 32-bit value. Additional query words: no32bit 3.00 3.10 listbox combobox list-box combo-box
Keywords : kb16bitonly |
Last Reviewed: November 4, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |