Hide console of Windows Application

You can get rid of the console by calling:

FreeConsole();

It sounds like your linker configuration is incorrect. Right-click the project, Properties, Linker, System, SubSystem setting. Make sure "Windows" is selected, not "Console".

And, change main() to WinMain().


In the project build linker options set

/SUBSYSTEM:windows
/ENTRY:mainCRTStartup

Or use the following #pragma in the source file with the int main(...)

#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")