Solved

Hiding Main Application Window At Startup

Posted on 1998-12-02
3
357 Views
Last Modified: 2013-11-20
How do I hide the main window at start up? I'm creating an MFC SDI app as a system tray item an would like the program to not show up when it starts. If I use WS_HIDE in the InitInstance() function of the app class the window flashes. I've tried modifing the CREATESTURCT in both OnCreate() and PreCreateWindow() in the MainFrame. For 100 points and what's behind curtain II, what have I missed.?
0
Comment
Question by:hap
[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
3 Comments
 

Author Comment

by:hap
ID: 1325692
Edited text of question
0
 
LVL 4

Accepted Solution

by:
pagladasu earned 100 total points
ID: 1325693
The only changes that you have to make are in your InitInstance() member function of your application class:
Here after the line - ParseCommandInfo(cmdInfo); and before the line if (!ProcessShellCommand(cmdInfo) add the following line:
m_nCmdShow=SW_HIDE;
and then change the line with m_pMainWnd->ShowWindow(SW_SHOW) to m_pMainWnd->ShowWindow(m_nCmdShow);
Thanks,
pagladasu
0
 

Author Comment

by:hap
ID: 1325694
Worked perfectly,

Thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

732 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