mirror of
https://github.com/reactos/reactos.git
synced 2025-04-27 00:50:23 +00:00
[COMCTL32] Read caret width from registry
Add caret width value to EDITSTATE structure. To keep the same behavior as Windows Server 2003, we need to update dwCaretWidth when EDIT_WM_SetFocus is called. CORE-18151
This commit is contained in:
parent
d794996217
commit
9789e9c409
2 changed files with 12 additions and 0 deletions
|
@ -103,6 +103,9 @@ typedef struct
|
||||||
HFONT font; /* NULL means standard system font */
|
HFONT font; /* NULL means standard system font */
|
||||||
INT x_offset; /* scroll offset for multi lines this is in pixels
|
INT x_offset; /* scroll offset for multi lines this is in pixels
|
||||||
for single lines it's in characters */
|
for single lines it's in characters */
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
DWORD dwCaretWidth;
|
||||||
|
#endif
|
||||||
INT line_height; /* height of a screen line in pixels */
|
INT line_height; /* height of a screen line in pixels */
|
||||||
INT char_width; /* average character width in pixels */
|
INT char_width; /* average character width in pixels */
|
||||||
DWORD style; /* sane version of wnd->dwStyle */
|
DWORD style; /* sane version of wnd->dwStyle */
|
||||||
|
@ -3691,6 +3694,9 @@ static void EDIT_WM_SetFocus(HTHEME theme, EDITSTATE *es)
|
||||||
if (!(es->style & ES_NOHIDESEL))
|
if (!(es->style & ES_NOHIDESEL))
|
||||||
EDIT_InvalidateText(es, es->selection_start, es->selection_end);
|
EDIT_InvalidateText(es, es->selection_start, es->selection_end);
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
SystemParametersInfo(SPI_GETCARETWIDTH, 0, &es->dwCaretWidth, 0);
|
||||||
|
#endif
|
||||||
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
||||||
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);
|
||||||
|
|
|
@ -102,6 +102,9 @@ typedef struct
|
||||||
HFONT font; /* NULL means standard system font */
|
HFONT font; /* NULL means standard system font */
|
||||||
INT x_offset; /* scroll offset for multi lines this is in pixels
|
INT x_offset; /* scroll offset for multi lines this is in pixels
|
||||||
for single lines it's in characters */
|
for single lines it's in characters */
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
DWORD dwCaretWidth;
|
||||||
|
#endif
|
||||||
INT line_height; /* height of a screen line in pixels */
|
INT line_height; /* height of a screen line in pixels */
|
||||||
INT char_width; /* average character width in pixels */
|
INT char_width; /* average character width in pixels */
|
||||||
DWORD style; /* sane version of wnd->dwStyle */
|
DWORD style; /* sane version of wnd->dwStyle */
|
||||||
|
@ -3905,6 +3908,9 @@ static void EDIT_WM_SetFocus(EDITSTATE *es)
|
||||||
ReleaseDC(es->hwndSelf, hdc);
|
ReleaseDC(es->hwndSelf, hdc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
SystemParametersInfo(SPI_GETCARETWIDTH, 0, &es->dwCaretWidth, 0);
|
||||||
|
#endif
|
||||||
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
CreateCaret(es->hwndSelf, 0, 1, es->line_height);
|
||||||
EDIT_SetCaretPos(es, es->selection_end,
|
EDIT_SetCaretPos(es, es->selection_end,
|
||||||
es->flags & EF_AFTER_WRAP);
|
es->flags & EF_AFTER_WRAP);
|
||||||
|
|
Loading…
Reference in a new issue