No function, you need to send messages to the window.
This will get line 0 from the listbox:
Code:
// Want item 0 (the first item):
unsigned int listItem = 0;
//First we find out how big it will be:
unsigned int charCount = ::SendMessage(hList,LB_GETTEXTLEN, (WPARAM) listItem, (LPARAM) 0);
// Then allocate enough space for the text plus terminating character:
TCHAR * buffer = new TCHAR[charCount + 1];
// Now, try to get the text itself:
if (::SendMessage(hList,LB_GETTEXT,(WPARAM)listItem,
(LPARAM)buffer) == LB_ERR){
// an error occured. Handle it here.
}
else {
// We know no error occured. Do stuff with buffer.
}
// We allocated string space, so we must free it once we don't need it anymore:
delete[] buffer;