SB_GETTEXTLENGTH message

Retrieves the length, in characters, of the text from the specified part of a status window.

Parameters

wParam

Zero-based index of the part from which to retrieve text.

lParam

Must be zero.

Return value

Returns a 32-bit value that consists of two 16-bit values. The low word specifies the length, in characters, of the text. The high word specifies the type of operation used to draw the text. The type can be one of the following values:

Return code Description
0
The text is drawn with a border to appear lower than the plane of the window.
SBT_NOBORDERS
The text is drawn without borders.
SBT_OWNERDRAW
The text is drawn by the parent window.
SBT_POPOUT
The text is drawn with a border to appear higher than the plane of the window.
SBT_RTLREADING
The text will be displayed in the opposite direction to the text in the parent window.

Remarks

Normal windows display text left-to-right (LTR). Windows can be mirrored to display languages such as Hebrew or Arabic that read right-to-left (RTL). If SBT_RTLREADING is set, the specified status window text will read in the opposite direction from the text in the parent window.

This message returns a maximum string length of 65,535 characters. If the actual text string is longer than that, the SB_GETTEXT message truncates it.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Commctrl.h
Unicode and ANSI names
SB_GETTEXTLENGTHW (Unicode) and SB_GETTEXTLENGTHA (ANSI)