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 |
What is the use of CCmdTarget ?
what is the component of CLR ?
What is the difference between regular dlls and extended dlls?
How to create a Modeless Dialog?
What is the use of CObject::Dump function ?
How to convert the content of buffer into lower case character.
How can i implement the dynamic menus in MFC plz give the code
Tell me the different controls in MFC ?
What is Multithreading
What interface must be supported by an ActiveX control?
What is the difference between the SDI and MDI
how to repaint when working with horizontal scroll bar