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 |
1)How to change a text of a button in runtime?
What is the difference between OnInitialUpdate and OnUpdate?
How to create a Modeless Dialog?
How do you change the properties for a tree view control that is part of the CTreeView class?
How can i change the color of a dropdowncombobox elements
what message is sent to an application when the user presses the primary button?
What types of threads are supported by MFC framework?
Which CPrintInfo member variable must be set for multiple page printouts?
what is the difference between compiling and building?
Explain Doc/View architecture
List out the basic features of MFC.
Tell me the different controls in MFC ?