How would I write a program that could be run as a background process? I don't mind if it flashes for a second or two when it starts up, I just generally want it out of my way. Thank you so much.
trainee
This is a discussion on Detaching a program from the console within the Windows Programming forums, part of the Platform Specific Boards category; How would I write a program that could be run as a background process? I don't mind if it flashes ...
How would I write a program that could be run as a background process? I don't mind if it flashes for a second or two when it starts up, I just generally want it out of my way. Thank you so much.
trainee
Since you do not want a console, I would suggest creating a Windows GUI project, but don't create any windows.
Is there a simpler way to do this?Originally posted by Dante Shamest
Since you do not want a console, I would suggest creating a Windows GUI project, but don't create any windows.
trainee
I thought that was the simplest way.
What kind of program are you trying to write? Can you give an example?![]()
Have you tried FreeConsole().
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
>>Is there a simpler way to do this?
There is no simpler way of doing it. replace int main() with:
Code:int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInst, /*LPSTR*/ char* CmdLine, int CmdShow)
SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
I say what I say, I mean what I mean.
IDE: emacs + make + gcc and proud of it.
Yes, I found that one out from a friend. This I believe is the simplest way of doing it.Originally posted by adrianxw
Have you tried FreeConsole().
trainee