c 2b 2b cmd program run in background

Solutions on MaxInterview for c 2b 2b cmd program run in background by the best coders in the world

showing results for - "c 2b 2b cmd program run in background"
Samuel
06 Apr 2016
1#include <windows.h>  
2#include <iostream>     
3using namespace std;
4
5
6int main () {   
7    cout<<"Some  information is displayed.. \n\n";
8    Sleep(5000);
9
10    cout<<"wait.. the console is going to hide and run in background.. \n";
11    Sleep(5000);
12
13    ShowWindow(FindWindowA("ConsoleWindowClass", NULL), false);
14
15    while(true) {
16                 // Do your hidden stuff in here
17    }   
18return 0;
19}
20
Juan Martín
23 Jan 2017
1HWND window;
2AllocConsole();
3window = FindWindowA("ConsoleWindowClass", NULL);
4ShowWindow(window,0);