[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Distinguishing between Back and Next in

Posted on 1997-08-28
5
Medium Priority
?
191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 100 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

649 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