Solved

Multiple document templates use

Posted on 1998-06-02
2
148 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

773 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