控制台应用程序的 Windows 默认大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/288255/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Windows default size for console application
提问by spender
While testing a console app, I set the properties of the console window to be only 3 lines high.
在测试控制台应用程序时,我将控制台窗口的属性设置为仅 3 行高。
This change has somehow stuck, meaning that new console windows default to 3 lines high. If I create a new shortcut on the desktop, and point it to cmd.exe, the window that opens is 3 lines high.
此更改以某种方式卡住了,这意味着新的控制台窗口默认为 3 行高。如果我在桌面上创建一个新的快捷方式,并将其指向 cmd.exe,则打开的窗口为 3 行高。
Of course, I can alter this value using the properties panel, which ultimately results in "current window only"/"future windows with same title"/"shortcut that started this window" dialog to alter the stickiness of the setting. None of these choices results in the default being changed. If, subsequently, I make a new shortcut to cmd.exe, it's still 3 lines high.
当然,我可以使用属性面板更改此值,这最终会导致“仅当前窗口”/“具有相同标题的未来窗口”/“启动此窗口的快捷方式”对话框来更改设置的粘性。这些选择都不会导致更改默认值。如果随后我为 cmd.exe 创建了一个新的快捷方式,它仍然是 3 行高。
The principal problem is that for any new console app that I write, the first time I debug it, I must change the size setting, and when I run the release build, it's the same story.
主要问题是,对于我编写的任何新控制台应用程序,第一次调试它时,我必须更改大小设置,当我运行发布版本时,情况也是一样。
Does anyone know where the default settings for new (i.e. new title or from new shortcut) console app are stored/how to change them?
有谁知道新(即新标题或新快捷方式)控制台应用程序的默认设置存储在哪里/如何更改它们?
[and, yes, I feel like a muppet for asking, but I can't find this info anywhere!]
[而且,是的,我觉得自己像个布偶,但我在任何地方都找不到这些信息!]
回答by Brody
Instead of using the Properties menu item - Use the defaults menu item.
而不是使用属性菜单项 - 使用默认菜单项。
回答by Duncan Smart
They're stored in the Registry:
它们存储在注册表中:
HKEY_CURRENT_USER\Console