mirror of
https://github.com/reactos/reactos.git
synced 2024-11-23 11:33:31 +08:00
[COMCTL32][USER32] EDIT: WM_SETFONT for IME (#5214)
- Call ImmSetCompositionFontW in WM_SETFONT handling of EDIT controls if necessary. - If the specified font is NULL, then use DEFAULT_GUI_FONT. CORE-11700
This commit is contained in:
parent
d0c657074d
commit
2b356adbc5
@ -3766,6 +3766,18 @@ static void EDIT_WM_SetFont(EDITSTATE *es, HFONT font, BOOL redraw)
|
||||
es->flags & EF_AFTER_WRAP);
|
||||
ShowCaret(es->hwndSelf);
|
||||
}
|
||||
#ifdef __REACTOS__
|
||||
if (ImmIsIME(GetKeyboardLayout(0)))
|
||||
{
|
||||
LOGFONTW lf;
|
||||
HIMC hIMC = ImmGetContext(es->hwndSelf);
|
||||
if (font == NULL)
|
||||
font = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
|
||||
GetObjectW(font, sizeof(lf), &lf);
|
||||
ImmSetCompositionFontW(hIMC, &lf);
|
||||
ImmReleaseContext(es->hwndSelf, hIMC);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,6 +53,8 @@
|
||||
#define ImmLockIMC IMM_FN(ImmLockIMC)
|
||||
#define ImmUnlockIMC IMM_FN(ImmUnlockIMC)
|
||||
#define ImmNotifyIME IMM_FN(ImmNotifyIME)
|
||||
#define ImmIsIME IMM_FN(ImmIsIME)
|
||||
#define ImmSetCompositionFontW IMM_FN(ImmSetCompositionFontW)
|
||||
#endif
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(edit);
|
||||
@ -3972,6 +3974,18 @@ static void EDIT_WM_SetFont(EDITSTATE *es, HFONT font, BOOL redraw)
|
||||
es->flags & EF_AFTER_WRAP);
|
||||
ShowCaret(es->hwndSelf);
|
||||
}
|
||||
#ifdef __REACTOS__
|
||||
if (ImmIsIME(GetKeyboardLayout(0)))
|
||||
{
|
||||
LOGFONTW lf;
|
||||
HIMC hIMC = ImmGetContext(es->hwndSelf);
|
||||
if (font == NULL)
|
||||
font = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
|
||||
GetObjectW(font, sizeof(lf), &lf);
|
||||
ImmSetCompositionFontW(hIMC, &lf);
|
||||
ImmReleaseContext(es->hwndSelf, hIMC);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user