• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

No automatic document opening on app start

I've created a MDI App with AppWizard. How do I prevent the
program from opening a default document when starting?
0
jntv
Asked:
jntv
1 Solution
 
hapCommented:
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

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now