Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Multiple document templates use

Posted on 1998-06-02
2
Medium Priority
?
171 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 11

Accepted Solution

by:
mikeblas earned 400 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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 viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
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.

730 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