This function retrieves information about the composition string.
At a Glance
Header file: | Imm.h |
Windows CE versions: | 2.10 and later (Japanese version 1.0 and later) |
Syntax
LONG ImmGetCompositionString(HIMC hIMC, DWORD dwIndex, LPVOID lpBuf, DWORD dwBufLen);
Parameters
hIMC
[in] Handle to the input context. In Windows CE versions 2.10 and later, if hIMC is NULL, then the length of the composition string, dwBufLen, is returned for the current active context.
dwIndex
[in] Specifies the index of the information to retrieve. For each value except GCS_CURSORPOS and GCS_DELTASTART, the function copies the requested information to the specified buffer. The function returns the cursor and delta position values in the low 16-bits of the return value.
lpBuf
[out] Long pointer to the buffer that receives the requested information.
dwBufLen
[in] Specifies the size of the buffer, in bytes. If zero, the ImmGetCompositionString function returns the buffer size needed for the complete information.
Return Values
The number of bytes copied to the destination buffer or, if dwBufLen is zero, the buffer size, in bytes, needed to receive all of the requested information indicates success. IMM_ERROR_NODATA indicates that the composition data is not ready in the input context. IMM_ERROR_GENERAL indicates that a general error was detected by IME.
Remarks
An application calls this function in response to the WM_IME_COMPOSITION or WM_IME_STARTCOMPOSITION message. The IMM removes the information when an application calls the ImmReleaseContext function.
See Also