Dear Kevin, thank you very much for your ingenious advice. I am afraid I failed to run it (Win XP), with message :
Error in C:\Program Files\Quick Macros 2\winapi.txt: function not found
on function :
GetConsoleScreenBufferInfoEx
I attach herewith a .png file with a screen shot. I would appreciate it if you could advice me. Best regards.
07-18-2018, 10:34 PM (This post was last modified: 07-18-2018, 10:54 PM by Kevin.)
Probably will need to drop the EX from the windows functions and adjust parameters or declare the functions first
Try to add declaration at beginning
and see if it works if not will need to come up with a solution for windows xp
09-02-2018, 09:46 PM (This post was last modified: 09-02-2018, 09:47 PM by Kevin.)
s
I redid SetConsuleBufferWindowSize2 slightly. Made it easier to resize. Only need to change width and height at the beginning now. Also fixed small bug in resizing cmd window, window dimensions need to be smaller than buffer when resizing even though will be same dimensions after.
ssimopi have been meaning to post this update but forgot till now
int width height w hwnd
width =100;; console width is in colums
height =40;;console height is in rows
;run "$system$\cmd.exe" "" "" "C:\" 16|0x10000 win("" "ConsoleWindowClass") w ;; use this if you want to run hidden while you resize console run"$system$\cmd.exe""""""*"0x10800win("""ConsoleWindowClass") w
SMALL_RECT srctWindow
srctWindow=scbi.srWindow SetConsoleWindowInfo(hConsole TRUE&srctWindow) FreeConsole ;hid- w ;;; use this if you run console hidden to show resized ;act w