Disabling the Cancel button in a Wizard

9 Jan 2004 13:03 mfc

CPropertySheet provides the SetWizardButtons function, allowing you to enable or disable the “Back” or “Next” buttons. It doesn’t, however, allow you to disable the “Cancel” button.

Here’s how:

    CWnd *pCancel = GetParent()->GetDlgItem(IDCANCEL);
    if (pCancel)
    	pCancel->EnableWindow(FALSE);