roger's picture

Disabling the Cancel button in a Wizard

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);

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <br> <code> <dd> <dl> <dt> <hr> <h1> <h2> <h3> <i> <img> <li> <ol> <p> <pre> <table> <td> <th> <tr> <tt> <u> <ul>
  • Images can be added to this post.

More information about formatting options