Send an LB_GETCURSEL message to retrieve the index of the currently selected item, if any, in a single-selection list box.
LB_GETCURSEL wParam = 0; // not used; must be zero lParam = 0; // not used; must be zero
This message has no parameters.
In a single-selection list box, the return value is the zero-based index of the currently selected item. If there is no selection, the return value is LB_ERR.
Do not send this message to a multiple-selection list box.
To retrieve the indexes of the selected items in a multiple-selection list box, use the LB_GETSELITEMS message. To determine whether the item that has the focus rectangle in a multiple selection list box is selected, use the LB_GETSEL message.
If sent to a multiple-selection list box, LB_GETCURSEL returns the index of the item that has the focus rectangle. If no items are selected, it returns zero.
LB_GETCARETINDEX, LB_GETSEL, LB_GETSELITEMS, LB_SETCURSEL
file: /Techref/os/win/api/win32/mess/src/msg10_4.htm, 1KB, , updated: 2000/4/7 11:20, local time: 2024/11/4 10:50,
52.14.135.68:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://ecomorder.com/techref/os/win/api/win32/mess/src/msg10_4.htm"> LB_GETCURSEL</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to ecomorder.com! |
.