Configuring the console to mimic a 80x25 Line Display

Hello,

I'm wondering if the console can be configured to mimic a 80 column by 25 line display. I've attempted some research on this and it looks like I can change the font (to a 'fixed width' font in my case) and the console buffer size (scrollback) can be changed as well. I'm not sure that does what I intend though. I'm wondering if anyone has any sample code for this (or something like it), as I'm thinking this would be a common issue for anyone seeking to translate old (DOS-style) character mode programs to the Windows console. I did check the forum for this and found some particularly useful console routines, but nothing directly addressing configuring the console.

Thanks. Gary

Yes*

Though, usually, you will use DOSBox or some other 16-bit emulator for that.
https://www.dosbox.com/


Most practically you can do this as part of setup.

The easiest way is to start your project as a program that does nothing more than sets the console title and waits for the user to press Enter to quit. (#include <windows.h> and use https://www.google.com/search?btnI=1&q=msdn+SetConsoleTitle.)

Start it, then click the console icon, then “Properties” to bring up the window configuration dialog. Set the font and screen buffer and window sizes and colors etc that you want.

(If Windows asks whether you want to apply changes to all future consoles, select No — this is for your particular application only!)

Then fire up the Registry Editor (Start/Search → “regedit”) and go to HKCU\Console\ and take a look at the values for your application’s window. This is what your installer needs to replicate in your user’s registry.

(If your application uses a custom font, you need to make sure that it is also properly installed.)

Thereafter, edit and configure your program as usual. Windows should automatically configure it based on your program’s title.

I prefer to also install a shortcut that sets the console title before the program even starts.

Good luck!
Thank you!!! Great explanation.
Topic archived. No new replies allowed.