In C++ it is possible to hide the window and make the program run as a background service, luckily this is extremely easy to do.

First we add this as our first line of the program.

Code:
#define _WIN32_WINNT 0x0500
Then in our main() function, we add.

Code:
HWND hWnd = GetConsoleWindow(); 
ShowWindow(hWnd, SW_HIDE);
This will result in our program becoming hidden

Here we have an example application that will run in the background for 10 seconds doing nothing.

riOnWZ.jpg

Enjoy.