Solved

No automatic document opening on app start

Posted on 1998-12-03
1
166 Views
Last Modified: 2013-11-20
I've created a MDI App with AppWizard. How do I prevent the
program from opening a default document when starting?
0
Comment
Question by:jntv
1 Comment
 

Accepted Solution

by:
hap earned 50 total points
ID: 1325719
If you are using 5.0 or later the only changes that you have to make are in your InitInstance() member function of your application class:

After the line:
      ParseCommandInfo(cmdInfo);
and before the line:
      if (!ProcessShellCommand(cmdInfo)

add the following lines:
      // DON'T display a new MDI child window during startup!!!
      cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
 
(I don't recall how it was done previously, but I recall it was more obvious, so I'm sure that this will solve your problem)

Good Luck
Hap
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

708 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

20 Experts available now in Live!

Get 1:1 Help Now