[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

No document at startup

Posted on 1998-12-04
2
Medium Priority
?
168 Views
Last Modified: 2013-11-20
I am doing one MDI with multiple documents types application.
The framework activates one window to choose the document
to open. That is fine during the new command but i don´t want to have this window every times the application starts.
In fact i would like to start the application without creating any document.
How can i do it?
0
Comment
Question by:jmartins71
[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 Comments
 
LVL 6

Accepted Solution

by:
stsanz earned 80 total points
ID: 1325760
If you created your MDI application with AppWizard, you should have the following lines in your CWinApp::InitInstance function :

// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
      return FALSE;

To prevent MFC to open a new MDI child window on app start, add the following two lines :

// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
-->  if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
-->    cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing ;
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
      return FALSE;

For more info, check "m_nShellCommand" online help.

0
 

Author Comment

by:jmartins71
ID: 1325761
thanks stsanz
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
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.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

650 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