Help Center

CTooltip.GetMaxTipWidthmethod

Retrieves the maximum width for a Tooltip window.

WindowsmethodCTooltip.incdocumented

Syntax

FUNCTION GetMaxTipWidth (BYVAL hTooltip AS HWND) AS LONG

Parameters

NameDescription
hTooltipThe handle of the Tooltip control.

Return value

Returns a LONG value that represents the maximum tooltip width, in pixels. If no maximum width was set previously, the message returns -1.

Description

Retrieves the maximum width for a tooltip window.

Remarks

The maximum tooltip 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 will be displayed on a single line. The length of this line may exceed the maximum tooltip width.

Reference

  • Include file CTooltip.inc
  • Defined in AfxNova/CTooltip.inc:335
  • Documented in Windows/WIndows Controls/CTooltip Class.md
  • Topic: CTooltip Class