Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Incease the buffer size of the cmd window
#5
cant test on xp but try this uses older WinApi functions(win2000) works on win7 as well

Function SetConsuleBufferWindowSize2
Code:
Copy      Help
int w
run "$system$\cmd.exe" "" "" "*" 0x10800 win("" "ConsoleWindowClass") w

int hwnd
if(!hwnd) hwnd=w; if(!hwnd) ret
if(!GetWindowThreadProcessId(hwnd &_i)) ret
lock
FreeConsole
if(!AttachConsole(_i)) ret

int hConsole = GetStdHandle(STD_OUTPUT_HANDLE)

CONSOLE_SCREEN_BUFFER_INFO scbi

GetConsoleScreenBufferInfo(hConsole &scbi)

COORD dwsize
dwsize.X = 100
dwsize.Y = 40
SetConsoleScreenBufferSize(hConsole dwsize)
scbi.srWindow.Bottom = 40
scbi.srWindow.Right = 100
scbi.srWindow.Left = 0
scbi.srWindow.Top = 0

SMALL_RECT srctWindow
srctWindow=scbi.srWindow
SetConsoleWindowInfo(hConsole TRUE &srctWindow)
FreeConsole
max w


Messages In This Thread
RE: Incease the buffer size of the cmd window - by Kevin - 07-18-2018, 11:39 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)