From: Zhiyi Zhang zzhang@codeweavers.com
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/comctl32/edit.c | 10 +++++++++- dlls/comctl32/tests/edit.c | 10 ---------- 2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c index f89e11c9203..01212df3525 100644 --- a/dlls/comctl32/edit.c +++ b/dlls/comctl32/edit.c @@ -25,7 +25,7 @@ * - EDITBALLOONTIP structure * - EM_HIDEBALLOONTIP/Edit_HideBalloonTip * - EM_SHOWBALLOONTIP/Edit_ShowBalloonTip - * - EM_GETIMESTATUS, EM_SETIMESTATUS + * - EM_GETIMESTATUS * - EN_ALIGN_LTR_EC * - EN_ALIGN_RTL_EC * - ES_OEMCONVERT @@ -143,6 +143,7 @@ typedef struct */ UINT composition_len; /* length of composition, 0 == no composition */ int composition_start; /* the character position for the composition */ + UINT ime_status; /* IME status flag */ /* * Uniscribe Data */ @@ -4810,6 +4811,13 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR result = EDIT_EM_GetCueBanner(es, (WCHAR *)wParam, (DWORD)lParam); break;
+ case EM_SETIMESTATUS: + if (wParam == EMSIS_COMPOSITIONSTRING) + es->ime_status = lParam & 0xFFFF; + + result = 1; + break; + /* End of the EM_ messages which were in numerical order; what order * are these in? vaguely alphabetical? */ diff --git a/dlls/comctl32/tests/edit.c b/dlls/comctl32/tests/edit.c index e13976a2387..de17fb26f93 100644 --- a/dlls/comctl32/tests/edit.c +++ b/dlls/comctl32/tests/edit.c @@ -3534,21 +3534,18 @@ static void test_ime(void) /* Note that EM_SETIMESTATUS always return 1, which is contrary to what MSDN says about * returning the previous LPARAM value */ lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, EIMES_GETCOMPSTRATONCE); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); todo_wine ok(lr == EIMES_GETCOMPSTRATONCE, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, EIMES_CANCELCOMPSTRINFOCUS); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); todo_wine ok(lr == EIMES_CANCELCOMPSTRINFOCUS, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, EIMES_COMPLETECOMPSTRKILLFOCUS); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); todo_wine @@ -3556,7 +3553,6 @@ static void test_ime(void)
lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, EIMES_GETCOMPSTRATONCE | EIMES_CANCELCOMPSTRINFOCUS | EIMES_COMPLETECOMPSTRKILLFOCUS); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); todo_wine @@ -3564,7 +3560,6 @@ static void test_ime(void) "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); ok(lr == 0, "Got unexpected lr %#Ix.\n", lr); @@ -3579,26 +3574,22 @@ static void test_ime(void) ok(lr == 1, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, 0, EIMES_GETCOMPSTRATONCE); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); ok(lr == 0, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING + 1, EIMES_GETCOMPSTRATONCE); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); ok(lr == 0, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0xFFFFFFFF); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); todo_wine ok(lr == 0xFFFF, "Got unexpected lr %#Ix.\n", lr);
lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); ok(lr == 0, "Got unexpected lr %#Ix.\n", lr); @@ -3626,7 +3617,6 @@ static void test_ime(void)
/* Test IME messages when EIMES_GETCOMPSTRATONCE is set */ lr = SendMessageA(hwnd, EM_SETIMESTATUS, EMSIS_COMPOSITIONSTRING, EIMES_GETCOMPSTRATONCE); - todo_wine ok(lr == 1, "Got unexpected lr %#Ix.\n", lr); lr = SendMessageA(hwnd, EM_GETIMESTATUS, EMSIS_COMPOSITIONSTRING, 0); todo_wine