Is there a way to disallow the user from changing the console buffer size? I'm in the initial stages of a project where I'd like to have complete control of the console buffer. Any suggestions? Thanks.
I don't know how you could *stop* the user from resizing the console screen buffer, but you can arrange to be notified of the resize event (polling required), and either undo the resize or (better IMO) adjust to it.
See 'Buffer-Resizing Events' here. (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/console_input_buffer.asp)
hth
Just as I suspected. Related to my previous question, do you know of any way (via the regestry perhaps) to set the font and font size?
According to this (http://www.powerbasic.com/support/forums/Forum5/HTML/002428.html) "Microsoft does not provide a programmatic way to change the font after the console window has been created." But perhaps Microsoft is moving in that direction because for Windows "Longhorn" and XP you can get the current console font and font size:
MSDN: GetCurrentConsoleFont (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getcurrentconsolefont.asp)
There is some information on doing it through the registry here (on page 2):
http://www.masmforum.com/simple/index.php?topic=1745.0
Thank you for the link to the discussion. It has some great information that will take a while to digest. I hadn't come across the GetCurrentConsoleFont function. It isn't in Win32.hlp.
I see there are several newer console functions described at msdn. A couple of them make reference to a system console font table, but don't provide any additional information. What is the structure of this table and how do I access it? Thanks.
I could not find any information on the system console font table.
I had forgotten about the undocumented SetConsoleFont function that Phoenix referred to here:
http://www.masmforum.com/simple/index.php?topic=1745.msg14316#msg14316
And for kernel32.dll version 5.0.2195.7006 (Windows 2000) SetConsoleFont is included in the exported functions. Perhaps someone could check this for Windows 98.