starting program without taskbar item

X

Xypher

I wrote a pretty basic application in c++ which runs in a

while (true)
{

//do something

Sleep(xxx milliseconds);
}

loop.

It is designed to run in the background. Therefore, it has no UI.
Though, when I start the app, a shell opens, of course.
Now I am looking for an easy way to get rid of this nasty shell - the
program just ought to run invisibly.

I want to avoid installing a service - is there another way?

I used the basic std c entry call:

int main(int argc, char argv[])
{
//...
//while loop (see above)
}

I avoided MFC and all the other MS stuff to keep the program small in
size. Currently it needs 140 kb RAM. It would be nice if the size
didn't become bigger.

Regards,

Xypher
 
L

lallous

Xypher said:
I wrote a pretty basic application in c++ which runs in a

while (true)
{

//do something

Sleep(xxx milliseconds);
}

loop.

It is designed to run in the background. Therefore, it has no UI.
Though, when I start the app, a shell opens, of course.
Now I am looking for an easy way to get rid of this nasty shell - the
program just ought to run invisibly.

I want to avoid installing a service - is there another way?

I used the basic std c entry call:

int main(int argc, char argv[])
{
//...
//while loop (see above)
}

I avoided MFC and all the other MS stuff to keep the program small in
size. Currently it needs 140 kb RAM. It would be nice if the size
didn't become bigger.

Regards,

Xypher

Hello

Compile your program as a Win32 GUI application rather than a Win32 console
application.
Your program will have WinMain() as entry point instead of main().

For further questions regarding this issue try asking in
microsoft.public.vc.language or .mfc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top