Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tooltip text truncated

I found out that sometimes, the text on my tooltip is not fully displayed. Here's an example for such text:

WWWWW WWWW, WW WWWWWWWW

WWWWWWWWWW WWWWWWWWWWWWW 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 it a known issue? Any help is appreciated. Thanks!

like image 691
Paul Avatar asked Aug 20 '17 10:08

Paul


1 Answers

Looks like calling tooltip.SetMaxTipWidth(MAXINT); fixes it.

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

like image 161
Paul Avatar answered Oct 11 '22 02:10

Paul