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 Synchronous sockets and asynchronous sockets?

2 Answers  


What is the command routing in MFC framework?

3 Answers  


1) Enable or disable a Cancel button at run time?

1 Answers   HCL,


How many types of dialog box are their

10 Answers   Honeywell,


What is LoadLibrary function returns?

7 Answers  






What is the base class for MFC

3 Answers   HCL,


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 the difference between hinsrtance and hprevinstance in WinMain function?

3 Answers  


Do you have an idea about MFC?

0 Answers   C DAC, CDAC,


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

2 Answers   Soltius Infotech,


What four types of properties are supported by an ActiveX control?

1 Answers  


1)To Remove WS_MINIMIZEBOX in a Frame ?

1 Answers  


Categories