views:

36

answers:

3

Can we change/increase the size of console output to view large size of data in console application at once?

A: 

There seem to be different ways to Rome:

  1. This should be the recommended way I would think, cause the name says it all: GetConsoleWindow as is demonstrated here.

  2. A quick hack might be the windows API function SendInput. If you simulate Alt+Enter, you could probably fullscreen the active window.

  3. Here are some propositions using API calls from user32.dll

ufotds
A: 

Check out the SetConsoleScreenBufferInfoEx API. It takes a CONSOLE_SCREEN_BUFFER_INFOEX as input and that has a dwSize member which contains the size of the console screen buffer, in character columns and rows.

MSDN for SetConsoleScreenBufferInfoEx Function: http://msdn.microsoft.com/en-us/library/ms686039(v=VS.85).aspx

Marjan Venema