1#include <WinUser.h>
2
3int main
4{
5 ShowWindow(GetConsoleWindow(), SW_HIDE);
6
7 return 0;
8}
1/*
2Anwser from greper
3Made by Mega145
4query: c++ hide console
5*/
6#include <Windows.h>
7void HideConsole()
8{
9 ::ShowWindow(::GetConsoleWindow(), SW_HIDE);
10}
11
12void ShowConsole()
13{
14 ::ShowWindow(::GetConsoleWindow(), SW_SHOW);
15}
16
17bool IsConsoleVisible()
18{
19 return ::IsWindowVisible(::GetConsoleWindow()) != FALSE;
20}
21
22void ToggleConsole()
23{
24 if (!IsConsoleVisible())
25 {
26 ShowConsole();
27 }
28 else if (IsConsoleVisible())
29 {
30 HideConsole();
31 }
32}
1#include <windows.h>
2
3int main
4{
5 ShowWindow(GetConsoleWindow(), SW_HIDE);
6 //ShowWindow(GetConsoleWindow(), SW_SHOW);
7 return 0;
8}