I need to delete tooltip window created for controls that will be deleted while the main window stays around. I came up with what is below, but it doesn't find any TOOLTIPS_CLASS windows. Any reason why?
TIA!!
for (HWND hwndtip=NULL; (hwndtip=FindWindowEx(hwnd, hwndtip, TOOLTIPS_CLASS, NULL))!=NULL;) {
// check if it has the control id we want
TOOLINFO toolinfo ={ 0 };
toolinfo.cbSize = sizeof(toolinfo);
toolinfo.hwnd = hwnd;
toolinfo.uFlags = TTF_IDISHWND;
toolinfo.uId = (UINT_PTR)hwndctl;
if (SendMessage(hwndtip, TTM_GETTOOLINFO, 0, (LPARAM)&toolinfo)) {
// found tooltip to delete
DestroyWindow(hwndtip);
result=TRUE;
break;
}
}