Disabling Windows Key and Alt-Tab
I'm really frustrated with trying to get windows to behave itself...
Here's what I want to do:
If my program is running, and the user hits the windows key, I want to prevent the start menu from popping up. I'm also interested in stopping alt-tab from working too.
Here's what I've tried:
- Capturing the WM_KEYUP, WM_KEYDOWN, WM_SYSKEYUP, and WM_SYSKEYDOWN messages. I can register that the key has been, in fact, pressed, but nothing I do seems to stop the start menu from popping up anyway.
- Getting exclusive access to they keyboard with DirectInput. Windows simply won't let me do that, and even if I could, I doubt it would work.
- Creating my window with WS_EX_TOPMOST, etc. System modal has been deprecated, so I don't want to try using that.
Any help would be very much appreciated!