MDI Document/View Thingy.

Hi,

Lets start at the begining,

What I would like to do is a wizard type application, ie. multiple dialogs with next and previous buttons.  Each dialog would be derived from the CFrameView class.  All data retrieved from these dialogs would then be stored within the single document object.

Right now my problem,

I have created a number of Form View classes, each with a different dialog resource, but how can I instantiate another the next form when the next button is pressed?

I've been playing around with this for a fair while now but I still can't get anywhere.

Also I can't have a list of different views appearing when the new document command is issued.

Is what I'm attempting sensible?

Does this make sense?
MrFlibble052199Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

inprasCommented:
Hi MrFlibble

The better Idea is to have several Frame activex (or something nearly same) control on dialog and put the controls on these Frames display (or change position) of the frame (one by one) and the associated control on it.

Just in case U want to change having multiple form views

This is the way every wizard works.

Regards

0
MrFlibble052199Author Commented:
I have no problem with multiple form views, it's just that on the New Document event a list of views is displayed to choose from, when the user should not be able to.  Therefore the views would have to be both dynamically allocated and removed on after every new and before close event.

Any suggestions?
0
mikeblasCommented:
inpras> This is the way every wizard works.

Huh?  Nearly no Wizard uses ActiveX frames to host wizard pages. And I can't think of a Wizard that uses an MDI interface.

What are you talking about?

Instead, nearly every wizard uses the PSH_WIZARD (or PSH_WIZARD97) flag in the PROPSHEETHEADER structure.

..B ekiM
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

MrFlibble052199Author Commented:
Right, OK!

How can I create show another view in the same frame window?

I think this is what I need to do.
0
mikeblasCommented:
MrFlibble> it's just that on the New Document event a list
 MrFlibble> of views is displayed to choose from

You should simply add a handler for ID_FILE_NEW in your frame window and do whatever it is you want in response to it.

Code emitted by the AppWizard normally routes this command (eventually) to MFC's CDocManager::OnFileNew() implementation.

It's that implementation that tries to see which document templates are registerd. If there's more than one registered, MFC tries to build the list box that you see in your app.

Note that the dialog will also not list templates which have an empty type name in their associated string resource. Maybe you can get by by removing the type names from the string resources you want to have hidden.

..B ekiM
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
migelCommented:
Hi!
There are several articles about FormView dynamic switching in the single frame see PAQ. (<a HREF=http://www.experts-exchange.com/jsp/qShow.jsp?ta=mfc&qid=10201445 >Q.10201445</a>)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.