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/7 18:43,
44.211.34.178: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://www.piclist.com/techref/os/win/api/win32/mess/src/msg10_4.htm"> LB_GETCURSEL</A> |
Did you find what you needed? |
PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to www.piclist.com! |
.