Solved

Distinguishing between Back and Next in

Posted on 1997-08-28
5
166 Views
Last Modified: 2013-11-20
I am using the Custom App Wizard to make one of my own custom wizards.

For each step in my custom wizard, an OnDismiss handler is generated. All validation of data for this step is to be done in this function (according to the comments inserted by the AppWizard). This handler is called whenever the user hits Next, Back or Finish in the wizards.

I would like to do some validation - but only if the user hit either the Next or the Finish button.  I don't want to bother validating if the user hit the Back button.

While in this handler, I can't seem to find a  way to let me know which button(Back/Next/Finish) was pressed. Any hints?  

0
Comment
Question by:shruthi
  • 3
  • 2
5 Comments
 
LVL 4

Expert Comment

by:davmarc
ID: 1305112
Override CCustomAppWiz::Back() and set a custom flag indicating the user pressed Back.
This gives you the ability to avoid doing your validations in CCustomAppWiz::OnDismiss() when the flag is set. In any case, turn off the flag in this method.

Davide Marcato.
0
 

Author Comment

by:shruthi
ID: 1305113
I doubt that this would work.  I have looked at it and the OnDismiss handler is called before the CCustomAppWiz::Back or
CCustomAppWiz::Next routine is called.  So, there is really no use in my setting a flag in the Back or Next routines - by then,
the code would have already walked through the validation in the
OnDismiss routine.
0
 
LVL 4

Accepted Solution

by:
davmarc earned 50 total points
ID: 1305114
Oops! You are right.
A wild guess...maybe the clicked button has the focus when OnDismiss() is called?

Davide Marcato.
0
 

Author Comment

by:shruthi
ID: 1305115
Thanks Davide!  The clicked button does seem to have the focus when the OnDismiss handler is called.  I would have preferred a far-more direct interface for this functionality, but I guess I'll have to be satisfied with this!
0
 
LVL 4

Expert Comment

by:davmarc
ID: 1305116
I get your point, but a (pretty) dirty workaround is better than nothing, isn't it?

Davide Marcato.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Folder Comparison 12 54
Pressing cancel button with C# UI Automation 3 70
only14 challenge 19 76
Execute multiple curl cmds with sleep and send output to file 10 97
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question