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



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

Answer / 106743013743

Hi,

Example:-

BOOL Ctharam::OnInitDialog()
{
CDialog::OnInitDialog();
// Below Code, To Enable or Disable a button as
runtime
CButton *pLogin1 = (CButton*)GetDlgItem(IDCANCEL);
pLogin1->SetWindowTextW(L"Reset");
pLogin1->EnableWindow(FALSE);

return TRUE;
}

Note:- pLogin1->EnableWindow(TRUE); // to enable a Cancel
button


I hope that it might be helpful to you!!!!!

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More MFC Interview Questions

What is primitive and non-primitive application?

2 Answers   HCL,


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

1 Answers  


what if we provide two message handler for same message ?

1 Answers  


What is LoadLibrary function returns?

7 Answers  


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

3 Answers   HP,






What is the base class for MFC Framework ?

2 Answers   Mphasis,


Explain about MDI and CMultiDocTemplate ?

2 Answers  


plzz tell me what we can do and dont in tally ERP & sap business one?

0 Answers  


How can server communicate with more than one client

2 Answers   Invensys,


How can we create thread in MFC framework?

3 Answers  


What is CSingleDocTemplate?

1 Answers  


1)how to Display the File Dialog Box, in MFC ?

1 Answers  


Categories