Pressing F10 causes WM_SETCURSOR message
I have found in my WinAPI app that WM_SETCURSOR is caused not only by mouse mo开发者_C百科vement, but also by pressing F10 key. How can be this explained and is there way to disable this behavior?
I have a theory regarding why the message is sent at all: Showing or activating the window menu could change what is being displayed under the mouse cursor. The mouse cursor now might be wrong with respect to what is underneath (as WM_SETCURSOR
normally is only generated when the mouse moves). The system knows this and generates a WM_SETCURSOR
to update the mouse cursor and make it consistent with the changed display.
If this is the case then I doubt that you can disable this behavior.
精彩评论