views:

102

answers:

1

I would like to have a layered window that is always-on-top, which I can accomplish, but there are certain screen elements that still get drawn over it, such as menus (including the start menu).

Is there any way to make a window or child window of my application have a high enough top-ness property that it will draw over another application's menus? Or is there something built in to windows that ensures that menus in the currently active application are always drawn on top?

In fact, I don't really understand all that well how menus work. So it might not even make any sense for me to try to make my window "act like a menu" in hopes of making it cover more things.

+1  A: 

There's only one level of TopMost, you'll compete with any other program that insists on being top-most. Try osk.exe for example. I'm guessing it uses a WH_SHELL hook to win.

Hans Passant
Wow, the on-screen keyboard `osk.exe` does stay on top of the start menu. Does anyone know how I can programmatically set my own layered window to do the same thing?(edit) whoops i didnt see the `WH_SHELL` thing. Will investigate that now.
Steven Lu
It doesn't stay on top btw, it worms its way back up to the top.
Hans Passant