GetMsgProc callback function 03/30/2018 2 minutes to read An application-defined or library-defined callback function used with the SetWindowsHookEx function. The system calls this function whenever the GetMessage or PeekMessage function has retrieved a message from an application message queue. Before returning the retrieved message to the caller, the system passes the message to the hook procedure.
注意这句:The system calls this function whenever the GetMessage or PeekMessage function has retrieved a message from an application message queue.