SAMPLE: Code Simulates Changing List Box StyleLast reviewed: April 7, 1997Article ID: Q84978 |
3.00 3.10
WINDOWS
kbprg kbfile
The information in this article applies to:
SUMMARYThe windows styles specified when an application creates a list box are fixed throughout its lifetime. LBCHANGE is a file in the Microsoft Software Library that demonstrates using two list boxes to simulate changing the style of a list box. Download LBCHANGE.EXE, a self-extracting file, from the Microsoft Software Library (MSL) on the following services:
MORE INFORMATIONWhen it creates a new window, Windows stores window style information in several internal data structures. Windows refers to these data structures when it performs window management tasks, including painting the window. If an application calls the SetWindowLong() function to change the window style dynamically, the new information is not reflected in the internal data structures. For example, an application can't effectively change a list box from the single selection style to the multiple selection style. An application can work around this situation in two different ways:
Although the second method uses memory more efficiently, it requires more work to implement. If the application changes the list box style often, managing the contents of the list box by saving and reloading the contents and tracking the selected items can become quite involved.
|
Additional reference words: 3.00 3.10 listbox softlib LBCHANGE.EXE
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |