INFO: LB_GETCARETINDEX Returns 0 for Zero Entries in List Box

ID: Q97922


The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK)
  • Microsoft Windows 2000


SUMMARY

To determine whether a multiple selection list box is empty or has no items to select, two messages are required. First, call LB_GETCOUNT to determine whether or not the list box is empty. If the list box is not empty, then use LB_GETCARETINDEX to determine the position of the caret.

If you want a list box to contain selections that remain after the focus goes elsewhere, Microsoft recommends using visible check marks next to the items in the list box. This method provides better visual feedback to the user than a selection bar.

Additional query words: listbox

Keywords : kbCtrl kbListBox kbNTOS kbWinOS2000 kbSDKWin32 kbGrpUser kbWinOS
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbinfo


Last Reviewed: January 25, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.