NotifyIME

BOOL NotifyIME(HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD dwValue )
 

Changes the status of the IME according to the given parameters.

If successful, the return value is TRUE. Otherwise, it is FALSE.

hIMC
Handle of the input context.
dwAction
Action flag. Can be one of these values:
Value Meaning
NI_OPENCANDIDATE An application requested that the IME open the candidate list. If the IME opens the candidate list, it sends the IMN_OPENCANDIDATE message. The dwIndex parameter is an index of a candidate list to open; dwValue is not used.
NI_CLOSECANDIDATE An application requested that the IME close the candidate list. If IME closes the candidate list, it sends the IMN_CLOSECANDIDATE message. The dwIndex parameter is the index of the candidate list to close; dwValue is not used.
NI_SELECTCANDIDATESTR An application selected one of the candidate lists. The dwIndex parameter is the index of the candidate list to be selected. The dwValue is the index of the candidate string in the selected candidate list.
NI_CHANGECANDIDATELIST An application selected a different candidate list. The dwIndex parameter is the index of the candidate list to select; dwValue is not used.
NI_SETCANDIDATE_PAGESTART An application changed the page starting index of a candidate list. The dwIndex parameter is the index of the candidate list to change. The dwValue parameter is the new page starting index.
NI_SETCANDIDATE_PAGESIZE An application changed the page size of a candidate list. The dwIndex parameter is the index of the candidate list to change. The dwValue parameter is the new page size.
NI_CONTEXTUPDATED An application or the system updated the input context. If the dwValue parameter is IMC_SETCONVERSIONMODE, dwIndex is the previous conversion mode. If dwValue is IMC_SETSENTENCEMODE, dwIndex is the previous sentence mode. If dwValue contains any other value; dwIndex is not used. The dwValue parameter can be one of following values (used with WM_IME_CONTROL):

IMC_SETCANDIDATEPOS

IMC_SETCOMPOSITIONFONT

IMC_SETCOMPOSITIONWINDOW

IMC_SETCONVERSIONMODE

IMC_SETSENTENCEMODE

IMC_SETOPENSTATUS

NI_COMPOSITIONSTR An application processes the composition string for the IME. This action is taken when the composition string is in the input context. The dwValue parameter is not used. The dwIndex parameter can be one of these values:
  CPS_COMPLETE Sets the composition string as the result string.
CPS_CONVERT Converts the composition string.
CPS_REVERT Cancels the current composition string and the unconverted string is set as the composition string.
CPS_CANCEL Clears the composition string and sets the status as no composition string.

dwIndex
Depends on dwAction.
dwValue
Depends on dwAction.