#include "stdafx.h"
#include <windows.h>
#include <iostream>
using namespace std ;
int _tmain(int argc, _TCHAR* argv[])
{
// Obtain the Console handle
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); // Obtain the Console handle
PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx = new CONSOLE_FONT_INFOEX() ;
// set the size of the CONSOLE_FONT_INFOEX
lpConsoleCurrentFontEx->cbSize = sizeof(CONSOLE_FONT_INFOEX);
// get the current value
GetCurrentConsoleFontEx(hConsole,0,lpConsoleCurrentFontEx);
// set size to be 8x18, the default size is 8x16
lpConsoleCurrentFontEx->dwFontSize.X = 8;
lpConsoleCurrentFontEx->dwFontSize.Y = 16;
// submit the settings
SetCurrentConsoleFontEx(hConsole,0,lpConsoleCurrentFontEx);
cout<<"Hello"<<endl;
cin.get(); // wait return 0;
}
#include <windows.h>
#include <iostream>
using namespace std ;
int _tmain(int argc, _TCHAR* argv[])
{
// Obtain the Console handle
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); // Obtain the Console handle
PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx = new CONSOLE_FONT_INFOEX() ;
// set the size of the CONSOLE_FONT_INFOEX
lpConsoleCurrentFontEx->cbSize = sizeof(CONSOLE_FONT_INFOEX);
// get the current value
GetCurrentConsoleFontEx(hConsole,0,lpConsoleCurrentFontEx);
// set size to be 8x18, the default size is 8x16
lpConsoleCurrentFontEx->dwFontSize.X = 8;
lpConsoleCurrentFontEx->dwFontSize.Y = 16;
// submit the settings
SetCurrentConsoleFontEx(hConsole,0,lpConsoleCurrentFontEx);
cout<<"Hello"<<endl;
cin.get(); // wait return 0;
}