SB_SETTEXT message

Sets the text in the specified part of a status window.

Parameters

wParam

The LOBYTE of the low-order word specifies the zero-based index of the part to set. If the LOBYTE is set to SB_SIMPLEID, the status window is assumed to be a simple mode status bar; that is, a status bar with only one part.

The HIBYTE of the low-order word specifies the type of the drawing operation. This parameter can be one of the following values.

The high-order word of wParam is ignored.

Value Meaning
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.
Note: A simple mode status bar does not support owner drawing.
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.
SBT_NOTABPARSING
Tab characters are ignored.

lParam

Pointer to a null-terminated string that specifies the text to set. If wParam is SBT_OWNERDRAW, this parameter represents 32 bits of data. The parent window must interpret the data and draw the text when it receives the WM_DRAWITEM message.

Return value

Returns TRUE if successful, or FALSE otherwise.

Remarks

The message invalidates the portion of the window that has changed, causing it to display the new text when the window next receives the WM_PAINT message.

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 lParam string will read in the opposite direction from the text in the parent window.

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_SETTEXTW (Unicode) and SB_SETTEXTA (ANSI)

See also

SB_GETTEXT