Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How to use the SetText in the CCmdUI class methods in visual studio c++?

user-image
Question added by karthik meda , Software trainee engineer , Altech imaging and computing
Date Posted: 2014/02/21
Deleted user
by Deleted user

The signature of SetText in CCmdUI looks like following:

 

void SetText(   LPCTSTR lpszText );

 

On some event you can use SetText in following way:

void CSomeXYZEditView::OnUpdateLineNumber(CCmdUI *pCmdUI) { int nLine =1; CString string; string.Format(_T("Line %d"), nLine); pCmdUI->Enable(TRUE); pCmdUI->SetText(string); }I hope the example helps how to use SetText.

More Questions Like This