CTooltip.SetMaxTipWidthmethod
Sets the maximum width for a Tooltip window.
Syntax
FUNCTION SetMaxTipWidth (BYVAL hTooltip AS HWND, BYVAL iWidth AS LONG) AS LONG
Parameters
| Name | Description | |
|---|---|---|
hTooltip | The handle of the Tooltip control. | |
iWidth | Maximum tooltip window width, in pixels; or -1 to allow any width. |
Return value
Returns the previous maximum tooltip width.
Description
Sets the maximum width for a tooltip window, in pixels.
Remarks
The maximum width value does not indicate a tooltip window's actual width. Rather, if a tooltip string exceeds the maximum width, the control breaks the text into multiple lines, using spaces to determine line breaks. If the text cannot be segmented into multiple lines, it is displayed on a single line, which may exceed the maximum tooltip width.
Reference
- Include file
CTooltip.inc - Defined in AfxNova/CTooltip.inc:586
- Documented in Windows/WIndows Controls/CTooltip Class.md
- Topic: CTooltip Class