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

Which MFC function is used to display output?

9 Answers   TCS,


Difference between Debug and Release versions?

4 Answers  


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

1 Answers  


What is Multithreading

1 Answers   Invensys,


What function is used to disable a control at runtime?

7 Answers  






What interface must be supported by an ActiveX control?

2 Answers  


how to repaint when working with horizontal scroll bar

0 Answers  


how u can move CDC pointer to one line in cview?

2 Answers  


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,


1)How to change a text of a button in runtime?

2 Answers  


What is a message map?

1 Answers   Mphasis,


Difference between Cclint DC & Cpaint Dc

6 Answers   E Logic,


Categories