Solved

How to create a new MDI child window with a specified file?

Posted on 1999-01-21
2
212 Views
Last Modified: 2013-11-20
Hi,

Well.. my question is : Would it be possible to create a
new MDI document with a specified file? You'll say : "Hey!
simply call the OnFileOpen function..." well.. no because
I don't want the "SelectFile" dialog to appear, I just want to open a specified file and automatically load it in a new MDI child window.
How's it possible?

Thanks!

David Marquis
0
Comment
Question by:dmarquis
2 Comments
 

Author Comment

by:dmarquis
ID: 1328152
Edited text of question
0
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 10 total points
ID: 1328153
Get the document template pointer (see you app's InitInstance()). From that pointer, call OpenDocumentFile(). For more information, see CDocTemplate::OpenDocumentFile().
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

832 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