Поделиться через


CCmdUI::SetText

Call this member function to set the text of the user-interface item for this command.

virtual void SetText(
   LPCTSTR lpszText 
);

Параметры

  • lpszText
    A pointer to a text string.

Пример

void CMyRichEditView::OnUpdateLineNumber(CCmdUI *pCmdUI)
{
   int nLine = GetRichEditCtrl().LineFromChar(-1) + 1;

   CString string;
   string.Format(_T("Line %d"), nLine);
   pCmdUI->Enable(TRUE);
   pCmdUI->SetText(string);
}

Требования

Header: afxwin.h

См. также

Основные понятия

CCmdUI Class

CCmdUI Members

Hierarchy Chart

CCmdUI::Enable