News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Multiline tooltips with TTS_BALLOON style show rectangles under Windows 10

Started by jj2007, February 18, 2024, 10:24:47 PM

Previous topic - Next topic

jj2007



I googled quite a bit, but so far I haven't found any explanation for this change, let alone an option to restore nicely rounded corners. Has anybody experienced this behaviour?

NoCforMe

Could you briefly explain how one gets these balloons in the first place? They look useful, but I've never used them.

I've used tooltips: is it just a matter of adding the TTS_BALLOON style to them?

(Also, what OS is this under? Answer: DUH. Check the topic.)
Assembly language programming should be fun. That's why I do it.

jj2007

Quote from: NoCforMe on February 19, 2024, 10:48:17 AMCould you briefly explain how one gets these balloons in the first place? They look useful, but I've never used them.
There are hundreds of tutorials on the web.

QuoteI've used tooltips: is it just a matter of adding the TTS_BALLOON style to them?
More or less, yes.

Quote(Also, what OS is this under?)
Windows XP & Win7 have rounded edges for all balloon-style tooltips. As explained above, and as the title of this thread says, Win10 uses sharp edges for multiline tooltips. Have a close look at the image above, maybe you'll understand.

sinsi


jj2007

Thanks for looking this up, Sinsi :thup:

I set TTM_SETMAXTIPWIDTH to 9999. Apparently, setting zero works, too, while using e.g. 9 for "GlobalFree" would simply display no text. Note that a lower TTM_SETMAXTIPWIDTH would be a problem if you have CrLf in your tooltip text, as in the GlobalAlloc example below - it would wrap prematurely.

Re TTN_NEEDTEXT notification, I am not using it in RichMasm, but I've tested it in another setting (see attached project) and found this:

sharp edges: mov pTextNotify, cfm$("Line 1\nLine 2\nLine 3\nLine 4\nLine 5\n")
round edges: mov pTextNotify, cfm$("cfm$("Line\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\nLine\n")")

So there is some "horizontal" (i.e. width) limit where it switches from round to sharp edges, plus a "vertical" limit: two-liners are always rounded, three-liners are rounded depending on their width.

Obviously it's nowhere documented, and I wonder whether it's a bug or a "feature" introduced in Windows 10 :cool:

I attach a testbed showing the odd behaviour of tooltips. The lower image is a screenshot from my Windows 7 VM - all is fine. It is definitely a Windows 10 problem.