Solved

Multiple document templates use

Posted on 1998-06-02
2
144 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
Comment Utility
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
Comment Utility
Please see the PICKNEW.ZIP sample at http://www.nwlink.com/~mikeblas/samples/.

.B ekiM
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Converting to C# also VS2015 5 110
TTimer no longer functioning 7 74
thread-safe code in c++ 2 69
Dialogbox API leak? 18 58
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

763 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

7 Experts available now in Live!

Get 1:1 Help Now