Querying a Selected List Box Item

hLBox = WinWindowFromID(hWnd,              /* Get list box window handle */
                        LB_LIST);

ulIndex = WinQueryLboxSelectedItem(hLBox); /* Get index of selected item */

ulLength = WinQueryLboxItemText(hLBox,             /* Get item text      */
                                usIndex,           /* Index of item      */
                                szBuffer,          /* Text buffer        */
                                sizeof(szBuffer)); /* Max no. of chars   */


[Back: Inserting an Item Into a List Box]
[Next: WinMessageBox() Function]