
Property Sheet Wizard Back Performs Validation. Why?
I'm implementing a wizard-style CPropertySheet. The default behaviour when
the Back button is clicked causes CPropertyPage::OnKillActive() to be
called, which in turn calls UpdateData( TRUE ). So there may be errors
reported in the data exchange function, and the end result is the wizard
does not move back to the previous page.
This seems intuitively wrong to me. If the user has clicked Back, he usually
wants to abandon data entry on the current page, and change an option on a
previous page (which might take him a completely different route through the
wizard). So he doesn't want to be told he's got errors on the current page
etc. Also, I don't believe the property page dialog is destroyed at that
point, so there is no need to upload his current data.
I know I could work around this by overriding OnWizardBack, setting a flag,
and bypassing the validation, but I wondered if there was some good reason
for this default behaviour? (Or is it just a bug, like the failure to
validate at all when the Finish button is clicked - a bug known to MS since
version 4.0, and which they haven't bothered to fix as of version 6.0 SP5?)
Cheers
Jon