это в конструкторе :
this->CreateEx(WS_EX_TOPMOST,
TOOLTIPS_CLASS, NULL,
WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, NULL,
NULL,
NULL,
NULL);
TOOLINFO g_toolItem;
SendMessage( TTM_SETMAXTIPWIDTH, 0, 100);
g_toolItem.cbSize = sizeof(TOOLINFO);
g_toolItem.uFlags = TTF_SUBCLASS;
g_toolItem.hwnd = hwndOwner;
g_toolItem.hinst = AfxGetInstanceHandle();
g_toolItem.lpszText = TEXT(" ");
g_toolItem.uId = (UINT)WM_USER+2258;
g_toolItem.rect=CRect(0,0,0,0);
this->SendMessage( TTM_ADDTOOL, 0, (LPARAM) &g_toolItem);
g_toolItem.uFlags = TTF_IDISHWND | TTF_TRACK | TTF_ABSOLUTE;
this->SendMessage(TTM_TRACKACTIVATE, (WPARAM)TRUE, (LPARAM)&g_toolItem);
this->ShowWindow(SW_HIDE);
Не получается менять текст в ToolTip-s
Создаю так:
Код:
пробую менять так:
Код:
TOOLINFO g_toolItem;
g_toolItem.cbSize = sizeof(TOOLINFO);
g_toolItem.hinst = AfxGetInstanceHandle();
g_toolItem.lpszText = TEXT("sdk");
ToolTip.SendMessage( TTM_UPDATETIPTEXT, 0, (LPARAM)&g_toolItem);
g_toolItem.cbSize = sizeof(TOOLINFO);
g_toolItem.hinst = AfxGetInstanceHandle();
g_toolItem.lpszText = TEXT("sdk");
ToolTip.SendMessage( TTM_UPDATETIPTEXT, 0, (LPARAM)&g_toolItem);