MDI Document/View Thingy.


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?
Who is Participating?
mikeblasConnect With a Mentor Commented:
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
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.


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?
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

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
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.
There are several articles about FormView dynamic switching in the single frame see PAQ. (<a HREF= >Q.10201445</a>)
All Courses

From novice to tech pro — start learning today.