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 Multithreading

1 Answers   Invensys,


What is the use of CObject::Dump function ?

4 Answers  


In SDI how many view's are attached to document object and in MDI how many view's are attached to Document object?

2 Answers   Wipro,


How you find memory leaks?

4 Answers   ABB,


What are the special requirements for dialog box resources used in a form view?

2 Answers  


What is the base class for MFC Framework ?

4 Answers  


What view class enables you to use an edit control as a view?

1 Answers  


what is the updated verssion in vc++

3 Answers   Aspect,


what is the size of a process

2 Answers   E Logic, IBM,


What interface must be supported by an ActiveX control?

2 Answers  


how do u identify RTTI in vc++

4 Answers   Siemens,


What is document-view architecture ? Give me one real time example for SDI ?

2 Answers  


Categories