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 do u identify RTTI in vc++

4 Answers   Siemens,


Tell me the different controls in MFC ?

5 Answers  


What interface must be supported by an ActiveX control?

2 Answers  


How you find memory leaks?

4 Answers   ABB,


In VC++ How to transfer between one exe to another exe while running..

5 Answers   Wipro,






2.create for 10 batch: Employee_Number Employee_name Employee_Dateofjoining Employee_address Employee_salary 1.select the employee name who deriving more than 10 thousand salary and joined before august 08. use structure and pointers

0 Answers   TCS,


1) create ToolTip in MFC?

2 Answers   HCL,


How can update edit control data of an executing application from other application?

3 Answers   HP,


Why Array Index starts from Zero

30 Answers   HCL,


19)how to set Back Ground Picture to a Dialog Box in MFC ?

1 Answers  


How to handle dynamic menus in MFC?

3 Answers   HCL,


Hi can anyone explain about the synchronization objects types and where we are using in the code.

1 Answers  


Categories