Ive created a tooltip control and can add tooltips by looping through all items of a listview in WM_CREATE. I use ListView_GetItemRect(p) within a for statement that loops through the total number of items "i".
But, when the tooltips show up, it only shows the first 10 items text. It doesn't matter if I am at the bottom of the listview or not.
Code:
ti.cbSize = sizeof(TOOLINFO);
ti.uFlags = TTF_SUBCLASS;
ti.hwnd = GetDlgItem(hwnd, listview);
ti.hinst = NULL;
reverse(DisplayName.begin(), DisplayName.end());
for(p = 0; p < i; p++)
{
string aReg = DisplayName[p]; //+ CompanyName
ti.lpszText = (CHAR*)aReg.c_str();
ListView_GetItemRect(GetDlgItem(hwnd, listview), p, &ti.rect, LVIR_BOUNDS);
SendMessage(tooltip, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti);
SendMessage(tooltip, TTM_ACTIVATE, TRUE, 0);
SendMessage(tooltip, TTM_SETMAXTIPWIDTH, 0, 5000);
}