Share via


CStatusBarCtrl::SetText

Sets the text in the given part of a status bar control.

BOOL SetText( 
   LPCTSTR lpszText, 
   int nPane, 
   int nType  
);

Parameters

  • lpszText
    Address of a null-terminated string specifying the text to set. If nType is SBT_OWNERDRAW, lpszText represents 32 bits of data.

  • nPane
    Zero-based index of the part to set. If this value is 255, the status bar control is assumed to be a simple control having only one part.

  • nType
    Type of drawing operation. See SB_SETTEXT message for a list of possible values.

Return Value

Nonzero if successful; otherwise zero.

Remarks

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

Example

VERIFY(m_wndSBC.SetText(_T("Text For Pane 1"), 1, 0));

Requirements

Header: afxcmn.h

See Also

Reference

CStatusBarCtrl Class

Hierarchy Chart

CStatusBarCtrl::GetText

CStatusBarCtrl::GetTextLength