Solved

How to create wizards in VC++

Posted on 2001-07-31
16
318 Views
Last Modified: 2013-11-20
hi everyone,

I am developing an application in VC++.I want a wizard to be there (in my application) just as it happens to be when we select File|New in VC++. This can be done by several dialog boxes in series but as per as Back|Next is concerned lots of overheads are coming into scene. Is there any easy way to build wizards? That is, is there any wizard to create wizards? Or is there any special tool to create that?

Please reply quickly....

Thank you in advance....
0
Comment
Question by:netwiz
  • 10
  • 5
16 Comments
 
LVL 12

Expert Comment

by:migel
ID: 6339390
Hi!
You have to use CPropertySheet in the wizard mode.
Also you can automate such Wizard creation just inserting in the project PropertySheet component in  the
MSVC ide:
menu Project|Add to project|Components and Controls
in the appeared dialog select
"Visual C++ component" folder and select PropertySheet icon
0
 

Author Comment

by:netwiz
ID: 6339599
ok migel,
let me try it...
0
 

Author Comment

by:netwiz
ID: 6344105
Well I'm being able to add wizards.But I want that acording to the user input in the first property page of the wizard ,the next dialog(Property Page) (among say three) will come. That I'm not being able to do. Please suggest how to proceed...

thank you very much for giving me the first light on wizards
0
 
LVL 12

Expert Comment

by:migel
ID: 6344240
Hi!
please explain this
>>But I want that acording to the user input in the first property
>>page of the wizard ,the next dialog(Property Page) (among say three) will come

Do you mean that next page depended on selection that user make in the first one?
or second page must appear automaticall when user click(, doubleclick) on the button(select list item , choose radio button)???
0
 

Author Comment

by:netwiz
ID: 6344520
I mean that next page is depended on selection that user make in the first one.Say on the first page two radio buttons are there.1. Create rectangle 2.Create triangle. If the user selects first one then the next page will ask him the length and bredth. And if user selects the 2nd one then it will ask for base and height.So, the second page will be different and will depend on the user input in the first page.

How to diverge like this...
0
 

Author Comment

by:netwiz
ID: 6344552
I mean that next page is depended on selection that user make in the first one.Say on the first page two radio buttons are there.1. Create rectangle 2.Create triangle. If the user selects first one then the next page will ask him the length and bredth. And if user selects the 2nd one then it will ask for base and height.So, the second page will be different and will depend on the user input in the first page.

How to diverge like this...
0
 
LVL 12

Expert Comment

by:migel
ID: 6344818
0
 

Author Comment

by:netwiz
ID: 6347392
Well I'm trying that...
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:netwiz
ID: 6347792
I tried that...but once DoModal is called it will start showing all the sequence of pages and before calling DoModal I'm not being able to Enable or disable any  of the pages.....so how to implement that....I tried adding handlers in the first page...but then passing the reference of the PropertySheet is being a problem .
0
 
LVL 12

Expert Comment

by:migel
ID: 6348040
Hi!
but you can add all pages you need regardless first page choose
and then according selection in the 1 page make unused pages disable by calling
m_page2.Enable(FALSE);
m_page2.Enable(FALSE);
and so on
0
 

Author Comment

by:netwiz
ID: 6348132
but where to call ?after calling DoModal?
0
 

Author Comment

by:netwiz
ID: 6348189
I will retrieve data from the PropertyPage objects after DoModal returns IDOK(ie,ID_CANCEL or ID_WIZFINISH for wizards).That is after all the pages are displayed. So how can I retrieve the result of the first page when DoModal is running...
0
 
LVL 12

Accepted Solution

by:
migel earned 200 total points
ID: 6348196
Hi!
there is virtual method for property page:
virtual LRESULT OnWizardNext();
just override it in the your first page and disable appropriate pages by calling parent window method(Enable);
for example:
LRESULT CMyFirstPage::OnWizardNext()
{
CWizPropertySheet* pSheet = (CWizPropertySheet*)GetParent();
if (pSheet)
 {
//according user choose
pSheet->Enable(FALSE, 2,3);
 }
}
0
 

Author Comment

by:netwiz
ID: 6348217
well trying it...
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6352236
Sorry to be off topic here, but netwiz, which expert did you intend to award here, since it requires manual intervention:

http://www.experts-exchange.com/jsp/qShow.jsp?ta=mfc&qid=20153556

Thanks, looking for your response to complete and award the intended expert promptly.

Moondancer
Community Support Moderator @ Experts Exchange
0
 

Author Comment

by:netwiz
ID: 6363222
Sorry I was out of station...itn is working fine ...thank U migel.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Login Script to Copy Folders 12 22
Windows Drag & Drop Location 2 85
Add content to output file 4 58
sum28 challenge 31 96
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now