mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[COMCTL32][USER32] EDIT: Half-implement WM_IME_SETCONTEXT handling (#5182)
Add WM_IME_SETCONTEXT handling to the window procedure of the EDIT control. CORE-11700, CORE-15289
This commit is contained in:
parent
b25daf4b56
commit
8d26b03775
2 changed files with 47 additions and 0 deletions
|
@ -45,6 +45,9 @@
|
||||||
#include "wingdi.h"
|
#include "wingdi.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
#include "imm.h"
|
#include "imm.h"
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
#include <immdev.h>
|
||||||
|
#endif
|
||||||
#include "usp10.h"
|
#include "usp10.h"
|
||||||
#include "commctrl.h"
|
#include "commctrl.h"
|
||||||
#include "uxtheme.h"
|
#include "uxtheme.h"
|
||||||
|
@ -4973,6 +4976,26 @@ static LRESULT CALLBACK EDIT_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
|
||||||
|
|
||||||
/* IME messages to make the edit control IME aware */
|
/* IME messages to make the edit control IME aware */
|
||||||
case WM_IME_SETCONTEXT:
|
case WM_IME_SETCONTEXT:
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if (FALSE) /* FIXME: Condition */
|
||||||
|
lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW;
|
||||||
|
|
||||||
|
if (wParam)
|
||||||
|
{
|
||||||
|
HIMC hIMC = ImmGetContext(hwnd);
|
||||||
|
LPINPUTCONTEXTDX pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC);
|
||||||
|
if (pIC)
|
||||||
|
{
|
||||||
|
pIC->dwUIFlags &= ~0x40000;
|
||||||
|
ImmUnlockIMC(hIMC);
|
||||||
|
}
|
||||||
|
if (FALSE) /* FIXME: Condition */
|
||||||
|
ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0);
|
||||||
|
ImmReleaseContext(hwnd, hIMC);
|
||||||
|
}
|
||||||
|
|
||||||
|
result = DefWindowProcW(hwnd, msg, wParam, lParam);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_IME_STARTCOMPOSITION:
|
case WM_IME_STARTCOMPOSITION:
|
||||||
|
|
|
@ -46,9 +46,13 @@
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <usp10.h>
|
#include <usp10.h>
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
|
#include <immdev.h>
|
||||||
#define ImmGetContext IMM_FN(ImmGetContext)
|
#define ImmGetContext IMM_FN(ImmGetContext)
|
||||||
#define ImmGetCompositionStringW IMM_FN(ImmGetCompositionStringW)
|
#define ImmGetCompositionStringW IMM_FN(ImmGetCompositionStringW)
|
||||||
#define ImmReleaseContext IMM_FN(ImmReleaseContext)
|
#define ImmReleaseContext IMM_FN(ImmReleaseContext)
|
||||||
|
#define ImmLockIMC IMM_FN(ImmLockIMC)
|
||||||
|
#define ImmUnlockIMC IMM_FN(ImmUnlockIMC)
|
||||||
|
#define ImmNotifyIME IMM_FN(ImmNotifyIME)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(edit);
|
WINE_DEFAULT_DEBUG_CHANNEL(edit);
|
||||||
|
@ -5286,6 +5290,26 @@ LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||||
|
|
||||||
/* IME messages to make the edit control IME aware */
|
/* IME messages to make the edit control IME aware */
|
||||||
case WM_IME_SETCONTEXT:
|
case WM_IME_SETCONTEXT:
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if (FALSE) /* FIXME: Condition */
|
||||||
|
lParam &= ~ISC_SHOWUICOMPOSITIONWINDOW;
|
||||||
|
|
||||||
|
if (wParam)
|
||||||
|
{
|
||||||
|
HIMC hIMC = ImmGetContext(hwnd);
|
||||||
|
LPINPUTCONTEXTDX pIC = (LPINPUTCONTEXTDX)ImmLockIMC(hIMC);
|
||||||
|
if (pIC)
|
||||||
|
{
|
||||||
|
pIC->dwUIFlags &= ~0x40000;
|
||||||
|
ImmUnlockIMC(hIMC);
|
||||||
|
}
|
||||||
|
if (GetWin32ClientInfo()->CI_flags & CI_WOW)
|
||||||
|
ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0);
|
||||||
|
ImmReleaseContext(hwnd, hIMC);
|
||||||
|
}
|
||||||
|
|
||||||
|
result = DefWindowProcT(hwnd, WM_IME_SETCONTEXT, wParam, lParam, unicode);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_IME_STARTCOMPOSITION:
|
case WM_IME_STARTCOMPOSITION:
|
||||||
|
|
Loading…
Reference in a new issue