Is there anything wrong in this piece of code?
I call this function in my WM_CREATE / WM_INITDIALOG, but I never see a tooltip ifCode:void CreateToolTip(HWND hwndParent, RECT rectTip, LPWSTR lpTipString){ HWND hwndTT = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hwndParent, NULL, hInst,NULL); SetWindowPos(hwndTT, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); TOOLINFO ti = { 0 }; ti.cbSize = sizeof(TOOLINFO); ti.uFlags = TTF_SUBCLASS|TTF_IDISHWND; ti.hwnd = hwndParent; ti.hinst = hInst; ti.lpszText = lpTipString; ti.rect = rectTip; SendMessage(hwndTT, TTM_ADDTOOL, 0, (LPARAM) (LPTOOLINFO) &ti); }
the mouse hovers the rect. I do call InitCommonControlsEx() before.
?




Reply With Quote