Index is always 0...it never incrememnts, shouldnt it?
MSDN says that particular SendMessage returns the index of the added string.
PHP Code://------------------
//Add an item to the list
//------------------
void ListBox::AddItem(char* Item)
{
int Index=0;
//add string
Index = SendMessage(m_hwnd, LB_ADDSTRING, 0, (LPARAM)Item);
SendMessage(m_hwnd, LB_SETITEMDATA, Index, (LPARAM)Item);
}




Reply With Quote