C语言中如何调整窗口大小

发布于 2024-12-12 13:29:23 字数 178 浏览 5 评论 0原文

嘿,我正在学习 C,我们已经在 Visual Studio 中完成了所有编码。我们所有的程序都已创建并输出到命令提示符类型窗口中。你不能让这个窗口全屏显示或任何东西。您所能做的就是更改垂直方向的长度。我可以在程序中使用特定代码来更改窗口的大小并使其静态吗?

如果它的代码太长而无法输入,带有教程的网站链接会很有帮助。谢谢你们。

Hey I'm learning C and we have done all our coding in Visual studio. All our programs have been created and outputted into a command prompt type window. You can't make this window full screen or anything. All you can do is change how long it is vertical wise. Is there a certain code I can use in my program to change the size of the window and make it static?

If the code for it is too long to type, a link to a website with a tutorial for it would be helpful. Thanks guys.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

樱桃奶球 2024-12-19 13:29:23

是的,有一组控制台功能。请参阅此处。

在我看来,您需要使用 GetLargestConsoleWindowSize ,然后使用 SetConsoleWindowInfo

Yes, there are a set of Console functions. See the list here.

It looks to me like you need to determine the maximum size of console using GetLargestConsoleWindowSize and then set that size using SetConsoleWindowInfo.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文