Shiny Language Reference
Language Reference > User Interface > List Boxes
getlistboxitemextra
dword getlistboxitemextra(int ID, int Index);
Synonyms:
dword getlistitemextra(int ID, int Index);
dword getlbitemextra(int ID, int Index);
Retrieves the extra data of the specified item
The GETLISTBOXITEMEXTRA statement retrieves the extra data associated with the item at the specified index in the list box. Indexes are unique, therefore this statement will only return one items data. An item's index is returned by the addlistboxitem statement, or the getlistboxcursel statement.
Parameters
ID
The control ID of the control you wish to retrieve the item data in
Index
The index of the item to retrieve the extra data of
Return Value
The extra data of the specified item, or 0x00000000 if the operation failed (due to invalid item etc). 0x00000000 will also be returned if the specified item does not have any extra data associated with it.
Example Code
// Create the edit box X: 10, Y:10 and sized 200*120
int iListBoxID = createlistbox(1, 10, 10, 200, 120);
// Add "Test item" with extra data to the listbox
int Index = addlistboxitem(iListBoxID, "Test item", 0x12345678);
// Retrieves the extra data using the index
dword Extra = getlistboxitemextra(iListBoxID, Index);