user243145
user243145

Reputation:

Changing CMD window properties programmatically

How can I change the appearance of my current CMD window? I know there is a 'mode' and 'color' commands that give you some control, but it's not enough...

Is it possible to change Screen Buffer Size separately? To turn QuickEdit mode on/off? Is there an API for this?

Upvotes: 4

Views: 3584

Answers (2)

ghostdog74
ghostdog74

Reputation: 342869

another way: use reg /? to query your registry for reg query HKEY_CURRENT_USER\Console. There you can see keys like ScreenBufferSize etc. Use reg to delete the key and add it back with new values. Type reg /? on the command line to see its help usage. make sure you backup registry before trying.

Upvotes: 4

Larry Osterman
Larry Osterman

Reputation: 16142

Search engines are amazing things :).

Search for Windows Console API and the 2nd link is: this. Digging in a tiny bit more and you find the interestingly named "SetConsoleMode" and "SetConsoleScreenBufferSize" APIs which appear to set the console mode (which includes quick edit mode) and screen buffer size.

I've not used the APIs so I don't know if there are any caveats, but from the documentation, these seem to be what you're looking for.

Upvotes: 6

Related Questions