Hiding a black window in C ++

Possible duplicate:
Create an application without a window
Win32 console console window

How to hide the console window that appears when I launch my C ++ program? The program does not output anything to stdout, and I do not need this black window to appear every time I run the program. I do not want it to be minimized. I want him to be invisible. Any ideas?

+5
source share
2 answers

If you want to hide the console, you can call FreeConsole in windows

#include <Windows.h>

int main()
{
    FreeConsole();
    //other stuff
}

, . , Windows GUI Windows, ,

#include <windows.h>

int WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR    lpCmdLine,
                     int       nCmdShow)
{
    //do stuff here
    return 0;
}
+16

, , . . , , , .

, . , . , GUI, .

+5

All Articles