编程遇到一个这样的问题,ToolTip提示框中想多行显示,开始就直接想,在想换行的地方加\n,发现没效果,在http://topic.csdn.net/t/20030324/19/1571119.html上看到有人讨论,有人摘过来一段解释,可能是MSDN上的,按说明做了,解决了问题。
Multiline ToolTips
Multiline
ToolTips
allow
text
to
be
displayed
on
more
than
one
line.
They
are
supported
by
version
4.70
and
later
of
the
common
controls.
Your
application
creates
a
multiline
ToolTip
by
responding
to
a
TTN_GETDISPINFO
notification
message.
To
force
the
ToolTip
control
to
use
multiple
lines,
send
a
TTM_SETMAXTIPWIDTH
message,
specifying
the
width
of
the
display
rectangle.
Text
that
exceeds
this
width
will
wrap
to
the
next
line
rather
than
widening
the
display
region.
The
rectangle
height
will
be
increased
as
needed
to
accommodate
the
additional
lines.
The
ToolTip
control
will
wrap
the
lines
automatically,
or
you
can
use
a
carriage
return/line
feed
combination,
\r\n,
to
force
line
breaks
at
particular locations.
Note
that
the
text
buffer
specified
by
the
szText
member
of
the