Underlining Characters in a ToolTip

My product, a toolbar for Outlook Express, uses tooltips to display keyboard shortcuts. For some localization work, I needed to display an underlined character within a tooltip.

The only hint I could find was a reference to .Net tooltips.

Apparently, in both .Net and Win32 tooltips, a single ampersand will be stripped, a double ampersand will cause the next character to be underlined, and three ampersands will display a single ampersand.

Input     Displayed
&B B
&&B B
&&&B &B

Note that this will be affected if the TTS_NOPREFIX flag is set, which prevents ampersands from being stripped.

About Jeff Fitzsimons

Jeff Fitzsimons is a software engineer in the California Bay Area. Technical specialties include C++, Win32, and multithreading. Personal interests include rock climbing, cycling, motorcycles, and photography.
This entry was posted in Technology, Win32. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *