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 */