CStatusBar::SetPaneText
Call this member function to set the pane text to the string pointed to by lpszNewText.
BOOL SetPaneText(
int nIndex,
LPCTSTR lpszNewText,
BOOL bUpdate = TRUE
);
Параметры
nIndex
Index of the pane whose text is to be set.lpszNewText
Pointer to the new pane text.bUpdate
If TRUE, the pane is invalidated after the text is set.
Возвращаемое значение
Nonzero if successful; otherwise 0.
Заметки
After you call SetPaneText, you must add a UI update handler to display the new text in the status bar.
Пример
//Sets and displays text for pane index 3 and id ID_INDICATOR_SCRL
m_wndStatusBar.SetPaneText(3, _T("My New Status Bar Text"), TRUE);
//UI handler in the message map updates the status bar text:
ON_UPDATE_COMMAND_UI(ID_INDICATOR_SCRL, &CMainFrame::OnUpdatePane)
void CMainFrame::OnUpdatePane(CCmdUI* pCmdUI)
{
pCmdUI->Enable();
}
Требования
Header: afxext.h