2

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.

artif
  • 907
  • 1
  • 7
  • 12

1 Answers1

5

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)();
Valerij
  • 27,090
  • 1
  • 26
  • 42
  • Excellent, thanks! Have you ever used JNA by any chance? How do you do it in JNA? It does not seem immediately obvious because there is no function name, only a number, and I do not see an equivalent of GetProcAddress for JNA. In either case, I accept this answer. (I can figure out the JNA sooner or later if you don't know the answer.) – artif Jan 26 '11 at 23:36