Sign in to follow this  
Netwatcher

Ghost window

Recommended Posts

I am trying to Create a window that will Always stay on the topmost Z order level, but will also not grab the focus from the back windows the user clicks at,
I get some of the mouse-over transparency from using the WS_EX_LAYERED style, and grabbing a desktop pic from the desktop DC, now I only need it to stay put when I change the active foreground window.
Another way I thought of for having the "ghosting" effect is making the window to never get minimized while changing the current foreground window(and as an effect 'losing' the mouse and keyboard from my window).

Share this post


Link to post
Share on other sites
Could you describe exactly what it is you're trying to do? Setting a window to the top of the Z-order is as easy as calling [url="http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545(v=vs.85).aspx"]SetWindowPos[/url] with the appropriate parameters, but that's not going to surrender mouse usage. If you want an overlay that just sits on top of everything but doesn't affect user input, there [i]might[/i][b] [/b]be a way to do it by specifically screwing with your hit-test messages, but I'm iffy on how exactly it would work.

Share this post


Link to post
Share on other sites
I am trying to create an overlay of the screen above the screen(using a Full Screen D3D device) so I can manipulate it later.
and I want it to allow interaction with other windows on the screen without my D3D app getting minimized when I click some other window ->
for example, when I click another window and I grab back the D3D window using SetForegroundWindow(), the new foreground window stays the same, but also the keyboard and mouse input are back to my D3D window instead of the clicked window.(which i don't want to happen)

Share this post


Link to post
Share on other sites
By not using fullscreen mode. You can use technical window mode while still covering the entire screen, so it looks like fullscreen. Not sure if that will let you do what you want, but it avoids D3D automatically removing you from fullscreen mode.

Share this post


Link to post
Share on other sites
When using the windowed-mode, I won't get a DC containing all the background windows because the new window isn't D3D's, it belongs to the desktop DC, so my window will just be Painting itself over itself...
I chose the d3d-fullscreen mode because I can fetch a pic of the desktop activity from the main(display) DC, and not bother about hiding my window from the DC.
Maybe there's a way to cancel this Full-Screen "feature" from the d3d device?!

Got around it by setting d3d's focus window the desktop's HWND, wonder why I couldn't figure it sooner... :(
Might need to get peripheral input from window messages and not dinput when doing this, dunno if it's a con or a pro.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this