Link to home
Start Free TrialLog in
Avatar of m26
m26

asked on

WM_KEYDOWN and the F10 key (non MFC app)

I need to catch function key presses in a windows application (c++ non mfc, NT4).

WM_KEYDOWN works fine for all the F keys apart from F10 becuase windows intercepts this key and sends a WM_SYSCOMMAND to activate the system menu on the window.

Is there any way I can prevent windows doing this so that I can handle the F10 key press myself in the same way I handle all the other function keys?
ASKER CERTIFIED SOLUTION
Avatar of nietod
nietod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mikeblas
mikeblas

F10 sends WM_SYSKEYDOWN because it _is_ a system key; it sets keyboard focus to the menu, just like pressing and releasing ALT without pressing another key in combination.

Windows has worked this way since Version 1.0.  OS/2 works the same way.

..B ekiM