|
-
December 2nd, 2008, 01:18 AM
#1
start hidden
I have a dialog-based app which runs loads at windows startup, but problem is i don't want to showing up this dialog at every startup so i need it to start hidden.Plz help me
-
December 2nd, 2008, 02:52 AM
#2
Re: start hidden
There are many possibilities for doing that.
What exactly do you want to do?
Launching an app with putting it in the autostart folder gives you the possibilty to start it minimized (use "properties" context menu entry). But I'm not sure if this works for dialog based apps (which are not intended for running without the (modal) dialog shown).
So you can use a non-dlg app.
Maybe you can run a GUI-less message loop before the modal dialog is called (it's usually inside the InitApplication method of your app).
With regards
Programartist
-
December 2nd, 2008, 03:11 AM
#3
-
December 2nd, 2008, 05:44 AM
#4
Re: start hidden
 Originally Posted by laitinen
Thanks laitinen
i am useing you example it's hide application.But when i start through desktop exe then i want to show application .Plz help me
-
December 2nd, 2008, 06:10 AM
#5
Re: start hidden
What do you mean? If you start it from the desktop you want it to be visible? You might add command line arguments to your app, and use them when starting from desktop. Search for command line arguments.
-
December 2nd, 2008, 06:29 AM
#6
Re: start hidden
make ur app accepts command line
when u set up the registry entry to start the app on startup , add a command line on the
registry key
-
December 3rd, 2008, 04:18 AM
#7
Re: start hidden
 Originally Posted by Cpp_Noob
make ur app accepts command line
when u set up the registry entry to start the app on startup , add a command line on the
registry key
Can any one give me command line example for dialog application.Plz help me
-
December 3rd, 2008, 04:28 AM
#8
Re: start hidden
 Originally Posted by Msm
Can any one give me command line example for dialog application.Plz help me
Code:
BOOL CMyApp::InitInstance()
{
// ...
if (m_lpCmdLine[0] == _T('\0'))
{
// Create a new (empty) document.
OnFileNew();
}
else
{
// Open a file passed as the first command line parameter.
OpenDocumentFile(m_lpCmdLine);
}
// ...
}
-
December 3rd, 2008, 04:44 AM
#9
Re: start hidden
You should get used to check the many great FAQs here at CodeGuru. If you had done that you would have found this:
MFC General: How to process command line arguments in a MFC application?
Laitinen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|