ImmGenerateMessage

BOOL WINAPI ImmGenerateMessage(hIMC)
 

An IME uses this function to generate messages stored in hMsgBuf of hIMC. This function sends the messages in the hMsgBuf to the hWnd of hIMC.

If the function succeeds, the return value is TRUE. Otherwise, it is FALSE.

hIMC
Handle of the input context that has hMsgBuf.

This is a general purpose function. Typically, an IME uses this function when it is notified about a context update with ImmNotifyIME from IMM. In this case, even if IME needs to provide messages to an application, there is no keystroke in the application's message queue.

An IME user interface should not use this function when it just needs to update the appearance of the UI. The IME user interface should have been updated when the IME is informed of the updated input context. This function should be used only when the IME changes the input context without any keystroke given and needs to inform an application of the change.