繁体   English   中英

告诉PDCurses通过编程使窗口大小与物理屏幕相同的方法吗?

[英]Method to tell PDCurses to make the window the same size as the physical screen programatically?

目前,我有一个在Win7 / AIX / Linux上运行的c ++控制台应用程序。 在应用程序中,我使用getmaxyx来获取窗口的尺寸。

getmaxyx(_window, _rows, _cols);

在Windows平台上,我需要使用正在运行的应用程序的(properties)(layout)选项,以使屏幕最大化。 有点痛苦。

仔细阅读该文档不会产生任何价值。

lines:  Specifies the number of lines the "screen" will have.
               Directly equates to LINES.
               There is no theoretical maximum.
               The minimum value must be 2.
               Default: 24
cols:   Specifies the number of columns the "screen" will have.
               Directly equates to COLS.
               There is no theoretical maximum.
               The minimum value must be 2.
               Default: 80

有什么技术可以使窗口调整为屏幕的实际大小? 有使用PDCurses和curses的便携式方法吗? 如果不是,是否有任何特定于平台的方式来实现此行为?

可能相关的SO问题

在这里perl用信号来做

        /* Resize the terminal to something larger than the physical screen */
        resize_term(2000, 2000);

        /* Get the largest physical screen dimensions */
        getmaxyx(_window, _rows, _cols);

        /* Resize so it fits */
        resize_term(_rows - 1, _cols - 1);

        /* Get the screen dimensions that fit */
        getmaxyx(_window, _rows, _cols);

暂无
暂无

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

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