FindWindowEx() is failing silently when I ask it to find the handle of my toolTip window. Here is my toolTip generation code:
And here is my code calling FindWindowEx:Code:HWND createTooltip(HWND hwnd){ INITCOMMONCONTROLSEX iccex; /* INITIALIZE COMMON CONTROLS */ iccex.dwICC = ICC_WIN95_CLASSES; iccex.dwSize = sizeof(INITCOMMONCONTROLSEX); InitCommonControlsEx(&iccex); HWND hwndTT = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hwnd, NULL, GetModuleHandle(NULL), NULL); SetWindowPos(hwndTT, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); return hwndTT; }
My parent window handle (hwnd) is the same handle I supplied during the ToolTip's creation; but despite this,Code:HWND hTT = FindWindowEx(hwnd, NULL, TOOLTIPS_CLASS, NULL);
FindWindowEx returns NULL and sets GetLastError to 0; where, according to microsoft's defintion here, it should be returning the handle to my ToolTip window. Exactly why does it refuse to do this?



LinkBack URL
About LinkBacks



CornedBee