Win32: Use ImmGetCompositionStringW() explicitly

ImmGetCompositionString() is ambiguous.
This commit is contained in:
Takuro Ashie 2022-04-15 13:12:39 +09:00 committed by Daijiro Fukuda
parent 599a1a98ec
commit 3a4d7eb85a

View File

@ -852,8 +852,8 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l
HIMC hIMC = ImmGetContext(hWnd); HIMC hIMC = ImmGetContext(hWnd);
// get preedit data sizes // get preedit data sizes
LONG preeditTextLength = ImmGetCompositionStringW(hIMC, GCS_COMPSTR, NULL, 0); LONG preeditTextLength = ImmGetCompositionStringW(hIMC, GCS_COMPSTR, NULL, 0);
LONG attrLength = ImmGetCompositionString(hIMC, GCS_COMPATTR, NULL, 0); LONG attrLength = ImmGetCompositionStringW(hIMC, GCS_COMPATTR, NULL, 0);
LONG clauseLength = ImmGetCompositionString(hIMC, GCS_COMPCLAUSE, NULL, 0); LONG clauseLength = ImmGetCompositionStringW(hIMC, GCS_COMPCLAUSE, NULL, 0);
if (preeditTextLength > 0) if (preeditTextLength > 0)
{ {
@ -868,8 +868,8 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM l
// get preedit data // get preedit data
ImmGetCompositionStringW(hIMC, GCS_COMPSTR, buffer, preeditTextLength); ImmGetCompositionStringW(hIMC, GCS_COMPSTR, buffer, preeditTextLength);
ImmGetCompositionString(hIMC, GCS_COMPATTR, attributes, attrLength); ImmGetCompositionStringW(hIMC, GCS_COMPATTR, attributes, attrLength);
ImmGetCompositionString(hIMC, GCS_COMPCLAUSE, clauses, clauseLength); ImmGetCompositionStringW(hIMC, GCS_COMPCLAUSE, clauses, clauseLength);
// store preedit text // store preedit text
while (ctext < length + 1) while (ctext < length + 1)