Are multiline tooltips possible using CWnd::EnableTooltips()?
Posted
by ctoneal
on Stack Overflow
See other posts from Stack Overflow
or by ctoneal
Published on 2010-01-25T17:50:29Z
Indexed on
2010/03/17
18:11 UTC
Read the original article
Hit count: 293
I'm attempting to make my tooltips multiline, but I don't seem to be having much luck with it. I call CWnd::EnableTooltips() directly after creation (in this case, an edit box) and I handle the TTN_NEEDTEXT message. My tooltips display correctly, but only display as a single line.
I've tried adding '\n' to the string I pass when handling TTN_NEEDTEXT, and also tried '\r\n'. No luck. It just displays them as normal text in the tooltip string.
I then tried manually inserting 0x0D0A, but this just displays as boxes.
I've been digging a bit, and have found a few offhand references on the web saying that multiline behavior may not work when using tooltips through the CWnd functions. I'd prefer not to have to replace with CToolTipCtrl (since it's a rather large project). Has anyone ran into this before? If so, is there any way around it?
© Stack Overflow or respective owner