mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[COMCTL32] Don't hardcode dwCaretWidth parameter while calling CreateCaret
Also replace 0 with NULL for the second argument of the function call. CORE-18151
This commit is contained in:
parent
9789e9c409
commit
a3eda784a5
2 changed files with 14 additions and 2 deletions
|
@ -3696,8 +3696,10 @@ static void EDIT_WM_SetFocus(HTHEME theme, EDITSTATE *es)
|
|||
|
||||
#ifdef __REACTOS__
|
||||
SystemParametersInfo(SPI_GETCARETWIDTH, 0, &es->dwCaretWidth, 0);
|
||||
#endif
|
||||
CreateCaret(es->hwndSelf, NULL, es->dwCaretWidth, es->line_height);
|
||||
#else
|
||||
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
||||
#endif
|
||||
EDIT_SetCaretPos(es, es->selection_end, es->flags & EF_AFTER_WRAP);
|
||||
ShowCaret(es->hwndSelf);
|
||||
EDIT_NOTIFY_PARENT(es, EN_SETFOCUS);
|
||||
|
@ -3752,7 +3754,11 @@ static void EDIT_WM_SetFont(EDITSTATE *es, HFONT font, BOOL redraw)
|
|||
EDIT_UpdateText(es, NULL, TRUE);
|
||||
if (es->flags & EF_FOCUSED) {
|
||||
DestroyCaret();
|
||||
#ifdef __REACTOS__
|
||||
CreateCaret(es->hwndSelf, NULL, es->dwCaretWidth, es->line_height);
|
||||
#else
|
||||
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
||||
#endif
|
||||
EDIT_SetCaretPos(es, es->selection_end,
|
||||
es->flags & EF_AFTER_WRAP);
|
||||
ShowCaret(es->hwndSelf);
|
||||
|
|
|
@ -3910,8 +3910,10 @@ static void EDIT_WM_SetFocus(EDITSTATE *es)
|
|||
|
||||
#ifdef __REACTOS__
|
||||
SystemParametersInfo(SPI_GETCARETWIDTH, 0, &es->dwCaretWidth, 0);
|
||||
#endif
|
||||
CreateCaret(es->hwndSelf, NULL, es->dwCaretWidth, es->line_height);
|
||||
#else
|
||||
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
||||
#endif
|
||||
EDIT_SetCaretPos(es, es->selection_end,
|
||||
es->flags & EF_AFTER_WRAP);
|
||||
ShowCaret(es->hwndSelf);
|
||||
|
@ -3962,7 +3964,11 @@ static void EDIT_WM_SetFont(EDITSTATE *es, HFONT font, BOOL redraw)
|
|||
EDIT_UpdateText(es, NULL, TRUE);
|
||||
if (es->flags & EF_FOCUSED) {
|
||||
DestroyCaret();
|
||||
#ifdef __REACTOS__
|
||||
CreateCaret(es->hwndSelf, NULL, es->dwCaretWidth, es->line_height);
|
||||
#else
|
||||
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
||||
#endif
|
||||
EDIT_SetCaretPos(es, es->selection_end,
|
||||
es->flags & EF_AFTER_WRAP);
|
||||
ShowCaret(es->hwndSelf);
|
||||
|
|
Loading…
Reference in a new issue