https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7151c30079b741c750dfa…
commit 7151c30079b741c750dfad23f24eec97e697f249
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Aug 24 11:10:23 2022 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Aug 24 11:10:23 2022 +0900
[USER32] Get/SetWindowLongPtr about PIMEUI (#4625)
In ImeWndProc_common, correctly get/set the PIMEUI value by Get/SetWindowLongPtrW.
CORE-11700
---
win32ss/user/user32/misc/imm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/win32ss/user/user32/misc/imm.c b/win32ss/user/user32/misc/imm.c
index 0bf16913d54..857ae50ae1f 100644
--- a/win32ss/user/user32/misc/imm.c
+++ b/win32ss/user/user32/misc/imm.c
@@ -959,6 +959,7 @@ ImeWndProc_common(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
BOOL unicod
NtUserSetWindowFNID(hwnd, FNID_IME);
pimeui = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IMEUI));
pimeui->spwnd = pWnd;
+ SetWindowLongPtrW(hwnd, 0, (LONG_PTR)pimeui);
}
else
{
@@ -967,7 +968,7 @@ ImeWndProc_common(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam,
BOOL unicod
ERR("Wrong window class for Ime! fnId 0x%x\n",pWnd->fnid);
return 0;
}
- pimeui = ((PIMEWND)pWnd)->pimeui;
+ pimeui = (PIMEUI)GetWindowLongPtrW(hwnd, 0);
if (pimeui == NULL)
{
ERR("Window is not set to IME!\n");