Home > DeveloperSection > Interviews > How to change the Text of a CButton at Runtime?

Posted on    March-28-2011 8:37 AM

 Visual C++ Visual C++ 
Ratings:
 1 Answer(s)
  1500  View(s)
Rate this:

Dependra Pathak
Dependra Pathak

Total Post:77

Points:385
Posted on    March-28-2011 12:00 AM

CButton *btnsample= (CButton *)GetDlgItem(IDC_BUTTON1); //suppose IDC_BUTTON1 is the ID of CButton
btnsample->SetWindowText(_T("Lahore"));

Don't want to miss updates? Please click the below button!

Follow MindStick