Tooltip text truncated

I found out that sometimes the text in my tooltip does not display completely. Here is an example for such text:

WWWWW WWWW, WW WWWWWWWW

WWWWWWWWWW WWWWWWWWWWWWWW WWWWWWWWW

Screenshot:

screenshot

My tooltip creation code (WTL):

CToolTipCtrl tooltip; TOOLINFO toolInfo; tooltip.Create(window, NULL, NULL, TTS_NOFADE); toolInfo = CToolInfo(TTF_IDISHWND | TTF_TRACK | TTF_ABSOLUTE, tooltip, 0, NULL, L"WWW..."); tooltip.AddTool(&toolInfo); tooltip.SendMessage(TTM_SETTITLE, (WPARAM)hIcon, (LPARAM)L"Title"); 

Is this a known issue? Any help is appreciated. Thanks!

+5
source share
1 answer

It looks like a call to tooltip.SetMaxTipWidth(MAXINT); corrects him.

SendMessage(..., TTM_SETMAXTIPWIDTH, 0, MAXINT); WTL version: SendMessage(..., TTM_SETMAXTIPWIDTH, 0, MAXINT);

+5
source

Source: https://habr.com/ru/post/1271029/


All Articles