Skip to content

Instantly share code, notes, and snippets.

@caloni
Created June 19, 2020 12:22
Show Gist options
  • Save caloni/dbc20aa51bba450c0f62854cfd1c3742 to your computer and use it in GitHub Desktop.
Save caloni/dbc20aa51bba450c0f62854cfd1c3742 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <windows.h>
#pragma comment(lib, "user32")
int main()
{
if( ! SetConsoleDisplayMode(GetStdHandle(STD_OUTPUT_HANDLE), CONSOLE_FULLSCREEN_MODE | CONSOLE_WINDOWED_MODE, NULL) )
{
// Se falhas com GLE 120 (função não suportada) usar função abaixo.
::SendMessage(::GetConsoleWindow(), WM_SYSKEYDOWN, VK_RETURN, 0x20000000);
}
system("chcp 65001");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment