1)How to change a text of a button as Dynamically?



1)How to change a text of a button as Dynamically?..

Answer / 106743013743

OK button to become Login

BOOL Csample_button_name_changeDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Below Below, to change text on button in runtime
CButton* pLogin;
pLogin = (CButton*)GetDlgItem(IDOK);
pLogin->SetWindowTextW(L"Login");

return TRUE; // return TRUE unless you set the
focus to a control

}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More MFC Interview Questions

What is the difference between OnInitialUpdate and OnUpdate?

5 Answers  


what is the component of CLR ?

8 Answers   AZTEC, Symphony,


What is a message map, and what is the advantage of a message map over virtual functions?

1 Answers  


What?s the difference between Modal and Modeless Dialog?

12 Answers   Jekson, Usl India,


How to handle RTTI in MFC ?

1 Answers  


1)How to change the size of a button at run time ?

1 Answers  


1)set the Title for The File DialogBox, in MFC?

1 Answers  


In MFC By Using Communication Between Dialog Boxes,How Can We Send Message Of one Dialog Box To Another Dialog.?

3 Answers   Financial Technologies,


List out the parameters of WinMain Function.

2 Answers   Mphasis,


How can server communicate with more than one client

2 Answers   Invensys,


Whats is DDX & DDV in MFC?

1 Answers   HCL,


What is #progma and where it is used?

5 Answers   L&T,


Categories