查找当前可见的桌面 [英] Finding currently visible desktop

查看:61
本文介绍了查找当前可见的桌面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何找到当前可见的桌面?通过调用EnumWindowStations

和EnumDesktops,我得到了所有可用桌面的列表。但有没有办法

来弄清楚其中哪一个当前可见?


我试图通过比较桌面找到可见的桌面处理,由OpenDesktop函数返回的
,通过调用OpenInputDesktop的

收到的桌面句柄。结果是默认桌面总是

当前正在接收用户输入的那个。

但是通过使用默认桌面我的窗口始终显示在桌面上

重启后第一个用户登录系统。无论这个

桌面目前是否可见!


作为第二次尝试,我为每个桌面调用了GetUserObjectInformation

并检查可见标志。但结果是没有可见的桌面

了!?


我做错了什么?或者搜索当前

可见桌面的正确方法是什么?

How can I find the currently visible desktop? By calling EnumWindowStations
and EnumDesktops I get a list of all available desktops. But is there a way
to figure out which one of them is currently visible?

I''ve tried to find the visible desktop by comparing the desktop handle,
returned by the OpenDesktop function, to the desktop handle received by
calling OpenInputDesktop. The result is that the default desktop is always
the one currently receiving user input.
But by using the default desktop my window always shows up at the desktop of
the first user logged on to the system after reboot. No matter if this
desktop is currently visible or not!

As a second attempt I''ve called GetUserObjectInformation for each desktop
and checked the visible flag. But the result is there is no visible desktop
at all !?

What am I doing wrong? Or what is the right way to search for the currently
visible desktop?

推荐答案

看一下这篇博客文章,这解释了为什么没有currentyl

可见桌面

http://blogs.msdn.com/oldnewthing/ar...22/712677.aspx


-

SvenC


" Mephisto187" < Me ********* @ discussion.microsoft.com写信息

news:40 ******************* *************** @ microsof t.com ...
Take a look at this blog entry, which explains why there is no "currentyl
visible desktop"

http://blogs.msdn.com/oldnewthing/ar...22/712677.aspx

--
SvenC

"Mephisto187" <Me*********@discussions.microsoft.comwrote in message
news:40**********************************@microsof t.com...

如何找到当前可见的桌面?通过调用

EnumWindowStations

和EnumDesktops我得到所有可用桌面的列表。但有没有一个

的方式

来弄清楚其中哪一个目前可见?


我试过通过将OpenDesktop函数返回的桌面句柄(

)与调用OpenInputDesktop的

收到的桌面句柄进行比较,找到可见桌面。结果是默认桌面总是

当前正在接收用户输入的那个。

但是通过使用默认桌面,我的窗口始终显示在桌面上



重启后第一个用户登录系统。无论这个

桌面目前是否可见!


作为第二次尝试,我为每个桌面调用了GetUserObjectInformation

并检查可见标志。但结果是没有可见的

桌面

了!?


我做错了什么?或者搜索目前

可见桌面的正确方法是什么?
How can I find the currently visible desktop? By calling
EnumWindowStations
and EnumDesktops I get a list of all available desktops. But is there a
way
to figure out which one of them is currently visible?

I''ve tried to find the visible desktop by comparing the desktop handle,
returned by the OpenDesktop function, to the desktop handle received by
calling OpenInputDesktop. The result is that the default desktop is always
the one currently receiving user input.
But by using the default desktop my window always shows up at the desktop
of
the first user logged on to the system after reboot. No matter if this
desktop is currently visible or not!

As a second attempt I''ve called GetUserObjectInformation for each desktop
and checked the visible flag. But the result is there is no visible
desktop
at all !?

What am I doing wrong? Or what is the right way to search for the
currently
visible desktop?



好的,让我更准确地重新解释一下我的问题:

我希望桌面当前在显示屏上可见直接连接到计算机上的
。没有远程或非活动桌面。如果有一个以上,

罚款,其中一个是可见的?

主要是:我需要找到当前已满的桌面

访问图形适配器硬件加速。


" SvenC"写道:
Okay, let me rephrase my question more precisely:
I want the desktop currently visible at the display connected directly to
the computer. No remote or inactive desktops. And if there''s more then one,
fine, which one of them are visible?
The main thing is: I need to find the desktop which currently has full
access to the graphic adapters hardware acceleration.

"SvenC" wrote:

看看这篇博客文章,解释为什么没有currentyl

可见桌面

http:// blogs。 msdn.com/oldnewthing/ar...22/712677.aspx

-

SvenC


" Mephisto187" < Me ********* @ discussion.microsoft.com写信息

news:40 ******************* *************** @ microsof t.com ...
Take a look at this blog entry, which explains why there is no "currentyl
visible desktop"

http://blogs.msdn.com/oldnewthing/ar...22/712677.aspx

--
SvenC

"Mephisto187" <Me*********@discussions.microsoft.comwrote in message
news:40**********************************@microsof t.com...

如何找到当前可见的桌面?通过调用

EnumWindowStations

和EnumDesktops我得到所有可用桌面的列表。但有没有一个

的方式

来弄清楚其中哪一个目前可见?


我试过通过将OpenDesktop函数返回的桌面句柄(

)与调用OpenInputDesktop的

收到的桌面句柄进行比较,找到可见桌面。结果是默认桌面总是

当前正在接收用户输入的那个。

但是通过使用默认桌面,我的窗口始终显示在桌面上



重启后第一个用户登录系统。无论这个

桌面目前是否可见!


作为第二次尝试,我为每个桌面调用了GetUserObjectInformation

并检查可见标志。但结果是没有可见的

桌面

了!?


我做错了什么?或者搜索目前

可见桌面的正确方法是什么?
How can I find the currently visible desktop? By calling
EnumWindowStations
and EnumDesktops I get a list of all available desktops. But is there a
way
to figure out which one of them is currently visible?

I''ve tried to find the visible desktop by comparing the desktop handle,
returned by the OpenDesktop function, to the desktop handle received by
calling OpenInputDesktop. The result is that the default desktop is always
the one currently receiving user input.
But by using the default desktop my window always shows up at the desktop
of
the first user logged on to the system after reboot. No matter if this
desktop is currently visible or not!

As a second attempt I''ve called GetUserObjectInformation for each desktop
and checked the visible flag. But the result is there is no visible
desktop
at all !?

What am I doing wrong? Or what is the right way to search for the
currently
visible desktop?









" Mephisto187" < Me ********* @ discussion.microsoft.com写信息

news:04 ******************* *************** @ microsof t.com ...
Hi,

"Mephisto187" <Me*********@discussions.microsoft.comwrote in message
news:04**********************************@microsof t.com...

好​​的,让我更准确地重新解释我的问题:

我希望桌面当前在显示器上可见,直接连接到计算机上的
。没有远程或非活动桌面。如果有更多的话,那么



罚款,其中一个可见?

主要是:我需要找到当前具有完整

访问图形适配器硬件加速的桌面。
Okay, let me rephrase my question more precisely:
I want the desktop currently visible at the display connected directly to
the computer. No remote or inactive desktops. And if there''s more then
one,
fine, which one of them are visible?
The main thing is: I need to find the desktop which currently has full
access to the graphic adapters hardware acceleration.



hmm - 桌面是否可以完全访问GPU或GPU的一部分,抱歉不要知道
。 />

-

SvenC

hmm - can a desktop have full access to a GPU or parts of a GPU, sorry don''t
know.

--
SvenC


" SvenC"写道:
"SvenC" wrote:

>看看这篇博客文章,解释为什么没有currentyl
可见桌面

http://blogs.msdn。 com / oldnewthing / ar ... 22 / 712677.aspx

- SvenC

" Mephisto187" < Me ********* @ discuss.microsoft.com写信息
新闻:40 *********************** *********** @ microso ft.com ...
>Take a look at this blog entry, which explains why there is no "currentyl
visible desktop"

http://blogs.msdn.com/oldnewthing/ar...22/712677.aspx

--
SvenC

"Mephisto187" <Me*********@discussions.microsoft.comwrote in message
news:40**********************************@microso ft.com...

如何找到当前可见的桌面?通过调用

EnumWindowStations

和EnumDesktops我得到所有可用桌面的列表。但有没有一个

的方式

来弄清楚其中哪一个目前可见?


我试过通过将OpenDesktop函数返回的桌面句柄(

)与调用OpenInputDesktop的

收到的桌面句柄进行比较,找到可见桌面。结果是默认桌面是

总是

当前正在接收用户输入的那个。

但是通过使用默认桌面,我的窗口始终显示

桌面



重启后第一个用户登录系统。无论这个

桌面目前是否可见!


作为第二次尝试,我已经为每个人调用了GetUserObjectInformation

桌面

并检查可见标志。但结果是没有可见的

桌面

了!?


我做错了什么?或者搜索目前

可见桌面的正确方法是什么?
How can I find the currently visible desktop? By calling
EnumWindowStations
and EnumDesktops I get a list of all available desktops. But is there a
way
to figure out which one of them is currently visible?

I''ve tried to find the visible desktop by comparing the desktop handle,
returned by the OpenDesktop function, to the desktop handle received by
calling OpenInputDesktop. The result is that the default desktop is
always
the one currently receiving user input.
But by using the default desktop my window always shows up at the
desktop
of
the first user logged on to the system after reboot. No matter if this
desktop is currently visible or not!

As a second attempt I''ve called GetUserObjectInformation for each
desktop
and checked the visible flag. But the result is there is no visible
desktop
at all !?

What am I doing wrong? Or what is the right way to search for the
currently
visible desktop?







这篇关于查找当前可见的桌面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆