简体   繁体   English

全屏获取C ++程序的输出,这是针对控制台输出窗口的代码

[英]Get output of c++ program in fullscreen.It is a console output window targeted code

I use Windows 7 Ultimate.I set the CMD on pc to almost fullscreen(changed the properties from cmd title bar).Though taskbar is visible , it is the maximum fullscreen possible on Windows 7,I suppose. 我使用Windows 7 Ultimate。我将PC上的CMD设置为几乎全屏(从cmd标题栏更改了属性)。虽然任务栏是可见的,但它可能是Windows 7上可能的最大全屏显示。

I wrote code for a small command line user interface game.I've made a mistake by assuming the output screen to be maximized on every user's PC. 我为一个小型的命令行用户界面游戏编写了代码,但假设每个用户的PC上的输出屏幕均已最大化,这是一个错误。

So,when I run it on another windows 7 machine,I'm getting weird output as the cmd screen is not maximized on their PC. 因此,当我在另一台Windows 7机器上运行它时,由于cmd屏幕未在其PC上最大化,我得到了奇怪的输出。

How can I ensure that I get the cmd screen set to fullscreen(almost fullscreen) on every PC it runs? 如何确保在每台运行的PC上将cmd屏幕设置为全屏(几乎全屏)?

Can I call some functions in my code? 我可以在代码中调用某些函数吗? Or any other way? 还是其他方式? I like to share it(the .exe file of my code) on the internet.So, how I can I fix this. 我喜欢在Internet上共享它(代码的.exe文件)。因此,我该如何解决。

What you have to do is run the program and change the settings in that specific command window, not the default settings for your command window. 您要做的是运行程序并更改该特定命令窗口中的设置,而不是命令窗口的默认设置。 You could do this with code as well, although I don't know how, but this is much easier. 您也可以使用代码来完成此操作,尽管我不知道如何做,但这要容易得多。 Then whenever that program is ran it should override the users default command settings and adhere to your program's. 然后,无论何时运行该程序,它都应覆盖用户的默认命令设置,并遵守您的程序。

Here's a similar answer of mine to another question about command colors. 这是我对命令颜色另一个问题的类似回答 Same solution should work here. 同样的解决方案应该在这里工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM