Question: mfc how to disable button?
Answer: You can do this in an MFC application by following these steps: Load the dialog into App Studio and change the OK button identifier from IDOK to something else such as IDC_MYOK. Also, clear the check from Default Button property. Use ClassWizard to create a message handling function for this button named OnClickedMyOK.