执行“显示桌面”来自 C++
我正在设计一个系统,用户做出手势,然后我的程序捕获它(使用网络摄像头),我的程序在规则系统(基于 XML)中查找它必须执行的操作。
好的,一旦我解释了背景,我想知道如何让我的程序“执行”显示桌面按钮。我想为用户提供执行手势并显示桌面的可能性。是否可以?我一直在寻找执行“显示桌面”按钮的程序(.exe),但恐怕它不存在。
I am designing a system where the user makes a gesture, then my program captures it (using a web cam) and my program looks in a rule system (based on XML) which are the actions that it has to do.
Ok, once I have explained the background, I'd like to know how I could make my program "execute" the Show Desktop button. I'd like to provide the user the possibility to do a gesture and show the desktop. Is it possible? I have been looking the program (.exe) that executes the Show Desktop button and I am afraid that does not exist.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
摘自这篇 MSDN 博客文章(日期为 2004 年,但当然仍然有效),您必须调用
ToggleDesktop().
C# 中的
: 编辑
C++ 版本:
From this MSDN blog post (dated 2004 but surely still valid), you must call
ToggleDesktop().
in C#:
EDIT
C++ version:
来自 http://www.codeguru.com/forum/showthread.php?t= 310202:
希望有帮助。它至少做了它应该做的事情,即最小化所有窗口。显示桌面。
From http://www.codeguru.com/forum/showthread.php?t=310202:
Hope it helps. It at least does what it should, minimizes all the windows aka. shows desktop.
您需要调用 ToggleDesktop。
You need to call ToggleDesktop.
在 Windows 中,您可以将脚本复制
到文件“somefile.scf”中,并通过手动执行“somefile.scf”从 shell 调用它。这对于 C++ 也是可能的。
In Windows you can copy the script:
into a file "somefile.scf" and invoke it from the shell by executing "somefile.scf" by hand. This is also possible with C++.