Microsoft KB Archive/64503

INF: Emulating Windows 2.x LBS_MULTIPLESEL in Windows 3.x PSS ID Number: Q64503 Article last modified on 05-10-1994

3.00 3.10 | 3.10

WINDOWS | WINDOWS NT

= SUMMARY =

Use the LBS_EXTENDEDSEL list box style in Windows version 3.0 and later to get functionality similar to that of the Windows 2.x LBS_MULTIPLESEL list box style. The functionality of list boxes with the LBS_MULTIPLESEL was changed between Windows versions 2.x and 3.0 to comply with the IBM CUA (Common User Access) guidelines.

= MORE INFORMATION =

The new LBS_EXTENDEDSEL list box style has a similar mouse interface to the Windows 2.x LBS_MULTIPLESEL style, but the keyboard interface is different.

With the mouse, you can toggle multiple noncontiguous items into and out of the current selection by holding down the CTRL and SHIFT keys. The user can select a contiguous range of items by using one of the following two methods:


 * 1) Click the first item and drag the mouse over the items to be selected.
 * 2) Click the first item, then hold the SHIFT key down while clicking the last item.

With the keyboard, you can select a continuous range of items using the following procedure:


 * 1) Use the UP ARROW or DOWN ARROW keys to move to the first item to be selected.
 * 2) Hold down the SHIFT key and use the arrow keys to add items to the selection.

Pressing an arrow key unaccompanied by the SHIFT key destroys the current selection. To create a discontinuous selection, you must be able to move the cursor without selecting. You can accomplish this by using the ADD mode; to place the list box into the ADD mode, press SHIFT+F8. You then can move about without selecting or without fear of destroying the selection already in progress. To add items into the selection, hold down the SHIFT key and press an arrow, or use the SPACEBAR. A second SHIFT+F8 turns off the ADD mode.

The LBS_EXTENDEDSEL style is just a user-interface variation of the LBS_MULTIPLESEL style. A list box created with both the LBS_EXTENDEDSEL and LBS_MULTIPLESEL styles will result in a LBS_EXTENDEDSEL style list box. Otherwise, the two styles of list boxes share the same styles, messages, parameters, and functions.

A Multiple Select style list box in a Windows 2.x application that has been marked as compatible with Windows 3.0 will have the Windows 3.0 user interface.

To simulate the functionality of a Windows 2.x Multiple Select style list box, your program must define a Windows class and to perform all necessary processing.

Additional reference words: 3.00 3.10 KBCategory: Prg KBSubcategory: UsrCtl

=
================================================================

Copyright Microsoft Corporation 1994.