c++ - MSDN 文档中的 OpenInputDesktop 究竟代表什么?

标签 c++ desktop msdn

我正在浏览 DesktopDuplication API Sample Code并且有很多功能我不清楚它们的确切设备和参数是什么。其中之一是 OpenInputDesktop .

下面是 DesktopDuplication API 示例代码中如何使用此函数的代码片段。

// Get desktop
    DUPL_RETURN Ret;
    HDESK CurrentDesktop = nullptr;
    CurrentDesktop = OpenInputDesktop(0, FALSE, GENERIC_ALL);

所以我的问题是这里的 Desktop 到底是什么意思?

如果我有一个多显示器系统,主桌面:1366X768,副桌面是 1920X1080,那么桌面是指主桌面的桌面区域:1366X768,还是桌面是指 (1920+1366)3286X1080 的整个屏幕区域?

或者我们是否可以选择在函数调用中选择上述两个桌面定义之一。但是,我找不到任何可以更改的参数。

更新 我提到了 Window Station and Desktop Creation还有DesktopWindow Stations但是我还没有找到我的问题的具体答案。 Here in Desktops据说:

This active desktop, also known as the input desktop, is the one that is currently visible to the user and that receives user input.

这是否意味着主监视器?我还在混淆桌面和显示器的概念

By default, there are three desktops in the interactive window station: Default, ScreenSaver, and Winlogon.

这就消除了桌面和显示器之间没有关系的疑问。但是,当连接多个显示器时,桌面区域意味着什么?主监视器或组合屏幕空间上的默认/屏幕保护程序是什么?

最佳答案

我在这个链接上找到了问题的答案:Virtual Screen .

它被提到的地方:

The bounding rectangle of all the monitors is the virtual screen. The desktop covers the virtual screen instead of a single monitor.

这基本上让我对桌面的确切含义感到困惑。感谢您的帮助@Ben Voigt

在此链接上:HMonitor and the Device Context已经提到:

Each physical display is represented by a monitor handle of type HMONITOR. A physical display has the same HMONITOR as long as it is part of the desktop.

因此,这清除了我关于物理设备、虚拟屏幕以及它们如何与 MSDN 中的监视器和桌面相关的概念。

希望这有助于搜索与我类似的答案的人。

关于c++ - MSDN 文档中的 OpenInputDesktop 究竟代表什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32826967/

相关文章:

c++ - GetLogicalDriveStrings() 和 char - 我哪里做错了

c++ - C++ 中的模板和虚函数 ?允许?

c++ - 从对象中获取值

c++ - C++ 中带有混合插件的奇怪循环继承

linux - gvim pid 以 $!与 wmctrl 列表不同

java - JWS JNLP 在 Mac 上没有桌面图标

c++ - 在 C++ 中拆分文件

batch-file - 我发现了一些显示/隐藏桌面图标的代码,但它在此过程中移动了图标。如何编辑代码以不移动图标?

c++ - 错误的函数调用 "IOCTL_DISK_GET_DRIVE_LAYOUT_EX"

visual-studio - Visual Studio 中的 MSDN 链接