Solved

Multiple document templates use

Posted on 1998-06-02
2
153 Views
Last Modified: 2012-05-04
I have an MDI application that is using multiple FormViews
as the documents.  I know how to associate the templates
with the document and mainframe classes using the RUNTIME
MACRO.  Right now if I click on new I get a VC++ generated
Input Box asking me which form to load.  How can I load one of
these forms with the selection of an item from a menu or the click
of a button.  The application is menu driven, and I need to load a
corresponding form according to the user selection.

Thank-you -- jr
0
Comment
Question by:jrmcg
  • 2
2 Comments
 
LVL 11

Accepted Solution

by:
mikeblas earned 100 total points
ID: 1165114
You'll need to write your own handler for the File/New (or the individual menu choices you want for each specific doc type, like "New Chart" or "New Sheet").

In there, just use a pointer to the doc template to call OpenDocumentFile() on the template you want to use. Pass NULL to create a new file, or pass a fully qualified path to serialiez from that particular file.

.B ekiM

0
 
LVL 11

Expert Comment

by:mikeblas
ID: 1165115
Please see the PICKNEW.ZIP sample at http://www.nwlink.com/~mikeblas/samples/.

.B ekiM
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

820 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