mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 13:34:53 +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
|
@ -3696,8 +3696,10 @@ static void EDIT_WM_SetFocus(HTHEME theme, EDITSTATE *es)
|
||||||
|
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
SystemParametersInfo(SPI_GETCARETWIDTH, 0, &es->dwCaretWidth, 0);
|
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);
|
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
||||||
|
#endif
|
||||||
EDIT_SetCaretPos(es, es->selection_end, es->flags & EF_AFTER_WRAP);
|
EDIT_SetCaretPos(es, es->selection_end, es->flags & EF_AFTER_WRAP);
|
||||||
ShowCaret(es->hwndSelf);
|
ShowCaret(es->hwndSelf);
|
||||||
EDIT_NOTIFY_PARENT(es, EN_SETFOCUS);
|
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);
|
EDIT_UpdateText(es, NULL, TRUE);
|
||||||
if (es->flags & EF_FOCUSED) {
|
if (es->flags & EF_FOCUSED) {
|
||||||
DestroyCaret();
|
DestroyCaret();
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
CreateCaret(es->hwndSelf, NULL, es->dwCaretWidth, es->line_height);
|
||||||
|
#else
|
||||||
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
||||||
|
#endif
|
||||||
EDIT_SetCaretPos(es, es->selection_end,
|
EDIT_SetCaretPos(es, es->selection_end,
|
||||||
es->flags & EF_AFTER_WRAP);
|
es->flags & EF_AFTER_WRAP);
|
||||||
ShowCaret(es->hwndSelf);
|
ShowCaret(es->hwndSelf);
|
||||||
|
|
|
@ -3910,8 +3910,10 @@ static void EDIT_WM_SetFocus(EDITSTATE *es)
|
||||||
|
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
SystemParametersInfo(SPI_GETCARETWIDTH, 0, &es->dwCaretWidth, 0);
|
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);
|
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
||||||
|
#endif
|
||||||
EDIT_SetCaretPos(es, es->selection_end,
|
EDIT_SetCaretPos(es, es->selection_end,
|
||||||
es->flags & EF_AFTER_WRAP);
|
es->flags & EF_AFTER_WRAP);
|
||||||
ShowCaret(es->hwndSelf);
|
ShowCaret(es->hwndSelf);
|
||||||
|
@ -3962,7 +3964,11 @@ static void EDIT_WM_SetFont(EDITSTATE *es, HFONT font, BOOL redraw)
|
||||||
EDIT_UpdateText(es, NULL, TRUE);
|
EDIT_UpdateText(es, NULL, TRUE);
|
||||||
if (es->flags & EF_FOCUSED) {
|
if (es->flags & EF_FOCUSED) {
|
||||||
DestroyCaret();
|
DestroyCaret();
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
CreateCaret(es->hwndSelf, NULL, es->dwCaretWidth, es->line_height);
|
||||||
|
#else
|
||||||
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
||||||
|
#endif
|
||||||
EDIT_SetCaretPos(es, es->selection_end,
|
EDIT_SetCaretPos(es, es->selection_end,
|
||||||
es->flags & EF_AFTER_WRAP);
|
es->flags & EF_AFTER_WRAP);
|
||||||
ShowCaret(es->hwndSelf);
|
ShowCaret(es->hwndSelf);
|
||||||
|
|
Loading…
Reference in a new issue