如何在 Windows 上以编程方式触发 Flip 3D? [英] How to programmatically trigger Flip 3D on Windows?

查看:23
本文介绍了如何在 Windows 上以编程方式触发 Flip 3D?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 Windows Vista 和 7 上以编程方式触发 Flip 3D?

是否有适用于此的 API?如果有,它的名称是什么?在哪里可以找到相关功能?(我需要一个具体的答案,例如一个指向实际功能的网络链接,而不是像哦,它在 DirectX 中"这样的通用链接.)

在相关节点上,我有一个 Logitech 鼠标,它有一个文档翻转"按钮,可以调用 Flip 3D(然后我可以按向上/向下键翻阅结果.)我很好奇他们是否使用官方 Windows API 或者是否有一些低级黑客正在进行.

解决方案

你需要从 dwmapi

运行一个函数

遗憾的是没有合适的功能名称,只有 ord-number 105

您可以通过从运行对话框或 cmd 执行 %WinDir%\System32\rundll32.exe dwmapi #105 来尝试此操作.

编辑我发现 Windows 的 API GetProcAddress 函数接受 ord-numbers(105)作为第二个参数以及专有名称

<块引用>

lpProcName [输入]
函数或变量名称,或函数的序数值.如果该参数为序数值,则必须在低位字中;高位字必须为零.

所以使用这个代码

<前>typedef vois (__cdecl *FlipProc)();HINSTANCE hDwmApi = LoadLibrary(TEXT("dwmapi.dll"));FlipProcAdd = (FlipProc) GetProcAddress(hDwmApi, (LPCSTR)105);(FlipProcAdd)();

How do I programmatically trigger Flip 3D on Windows Vista and 7?

Is there an API for this and if so, what is it called and where can I find the relevant functions? (I need a specific answer, eg a web link to the actual functions, not something generic like "Oh, it's in DirectX.")

On a related node, I have a Logitech mouse that has a "Document Flip" button that invokes Flip 3D (and then I can press up/down keys to page through the results.) I am curious if they are using an official Windows API or if there is some low level hackery going on.

解决方案

you need to run a function from dwmapi

Sadly there is no proper funktion name only the ord-number 105

You can try this by executing %WinDir%\System32\rundll32.exe dwmapi #105 from Run-dialog or cmd.

edit ive found out the Windows' API GetProcAddress Function accepts ord-numbers (the 105) as second parameter as well as proper name

lpProcName [in]
The function or variable name, or the function's ordinal value. If this parameter is an ordinal value, it must be in the low-order word; the high-order word must be zero.

so use this code

typedef vois (__cdecl *FlipProc)();
HINSTANCE hDwmApi = LoadLibrary(TEXT("dwmapi.dll"));
FlipProcAdd = (FlipProc) GetProcAddress(hDwmApi, (LPCSTR)105);
(FlipProcAdd)();

这篇关于如何在 Windows 上以编程方式触发 Flip 3D?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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