PDA

View Full Version : Disabling the windows key.



Owlet
11-14-2001, 03:00 PM
I know this is slightly irrelevant, but it's the best place I could think of to ask.

How do I disable the stupid windows key in C++? I wish to make an application that can prevent the start menu from popping up because this key is pressed.

Thank you,
Owlet

no-one
11-14-2001, 06:08 PM
try asking here http://www.cprogramming.com

Platinum
11-15-2001, 12:21 AM
You can trap the WM_KEYDOWN WM_KEYUP WM_SYSKEYDOWN and WM_SYSKEYUP messages.

I had a similar problem and this solved most of it, but I didn't get rid of the ALT+TAB combination (still works).

Hope it helps

greets
Platinum

Owlet
11-15-2001, 08:11 AM
Platinum --

Thanks for the advice. I had sort of tried something like that before, but with no success... My program could pop up a message box saying that the start key had been pressed, but then the message somehow "fell through" and the Start menu popped up anyway. Maybe I'm not doing something correctly though (e.g. not returning the right value). I'm going to try it again and see how it works. I also may have not captured the WM_SYSKEYUP message, because I've noticed that the start menu doesn't come up until you actually release the key.

Thanks,
Owlet

Owlet
11-15-2001, 08:16 AM
Odd. My program can capture the WM_SYSKEYDOWN part of the windows key being pressed, but not the WM_SYSKEYUP. It doesn't seem to get the message at all. Anyone know what's up with that?

Owlet