coder_1024
December 6th, 2004, 03:34 PM
I'm interested in creating a window which is always on top. I've used SetWindowPos() which results in a stay-on-top window. This doesn't work (i.e. the window is not visible) however, with applications which make use of DirectX full screen exclusive mode as the DirectX app takes precedence over the stay-on-top window.
It would seem like DLL injection and API hooking may be what is required for this. i.e. inject into applications and hook the DirectX present() call, thereby allowing your app to render things on top of the DirectX display. I've seen some apps which appear to be doing this and they seem to work fine.
The problem there is that I don't simply want to render simple graphics/text on top of the DirectX display. I'd like the window itself to display and be useable. It would seem you'd need to render and capture events to really allow the user to interact with the window. Of course, if this is not feasible, at least rendering some simple text/graphics would at least be acceptable.
Anyway, just wondering if any of the gurus know of any sample/packaged code which takes care of this for you (either the simpler case of just rendering on top of DirectX or the more complex case of actually presenting an interactive window on top of DirectX).
Also, note that it would need to work regardless of whether such a DirectX app is running. i.e. it would still be necessary to have the normal window up with the stay-on-top attribute, and then have the DirectX interaction activate only while an app is using DirectX fullscreen exclusive mode.
It would seem like DLL injection and API hooking may be what is required for this. i.e. inject into applications and hook the DirectX present() call, thereby allowing your app to render things on top of the DirectX display. I've seen some apps which appear to be doing this and they seem to work fine.
The problem there is that I don't simply want to render simple graphics/text on top of the DirectX display. I'd like the window itself to display and be useable. It would seem you'd need to render and capture events to really allow the user to interact with the window. Of course, if this is not feasible, at least rendering some simple text/graphics would at least be acceptable.
Anyway, just wondering if any of the gurus know of any sample/packaged code which takes care of this for you (either the simpler case of just rendering on top of DirectX or the more complex case of actually presenting an interactive window on top of DirectX).
Also, note that it would need to work regardless of whether such a DirectX app is running. i.e. it would still be necessary to have the normal window up with the stay-on-top attribute, and then have the DirectX interaction activate only while an app is using DirectX fullscreen exclusive mode.