First you need to make sure that the main window does not have the WS_EX_LAYERED Windows style. This style makes SetWindowDisplayAffinity unsuccessful with code 8 ( ERROR_NOT_ENOUGH_MEMORY ), at least on my machine (Seven Pro 64 bit). In -app.xml file set the value false for node <transparent> in the <initialWindow> section.
Secondly, you need to choose how to inject the regular C DLL into the application process, since the API will fail with error 5 ( ERROR_ACCESS_DENIED ) if you try to change the proximity of a window that does not reside during the call.
One possible injection method is the SetWindowsHookEx API. Google will give you a lot of hits about it. Feel free to ask for some details. You obviously need another process to collaborate here (and some Win32 API practices).
Another possible way is to encode 'ACTIONSCRIPT® Extensions for ADOBE® AIR®' (PDF) .
Later seems preferable:
- No collaboration with an external process is required.
- Adobe AIR downloads the DLL for you.
- C / C ++ code is much simpler.
I used the first method, since I am more fluent in the raw Win32 APIs by DLL than with AIR and Action Script ...
I successfully tested this first technique with the very simple AIR Desktop application "Hello World" and got the "All Black" image after the print screen.
manuell
source share