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

How to handle RTTI in MFC ?

1 Answers  


Does the application have more than one object? If Yes, Briefly explain.

2 Answers   Soltius Infotech,


I can i set size of integer variable should be fixed for different operating systems(Ex i want integer size is 2bytes in OS)

2 Answers   Invensys,


What is userdefine Messages in MFC?

1 Answers   HCL,


what is the updated verssion in vc++

3 Answers   Aspect,






How to create a Modeless Dialog?

5 Answers  


Tell me the work of HTREDUCE and HTZOOM

1 Answers   E Logic,


What is subclassing?

2 Answers  


what do you mean by psychic window?

2 Answers   Patni,


How do you change the properties for a tree view control that is part of the CTreeView class?

1 Answers  


Why not virtual functions to handle messages?

5 Answers  


how does conditionally close the Dialog Box ?

2 Answers   Infotech,


Categories