[PATCH] comctl32: Initialize early some edit control properties.
Roman Pišl
rpisl at seznam.cz
Wed Mar 25 05:46:30 CDT 2020
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48803
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=19239
Signed-off-by: Roman Pišl <rpisl at seznam.cz>
---
dlls/comctl32/edit.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/comctl32/edit.c b/dlls/comctl32/edit.c
index 2538eda4b6..6793a9818b 100644
--- a/dlls/comctl32/edit.c
+++ b/dlls/comctl32/edit.c
@@ -4489,6 +4489,14 @@ static LRESULT EDIT_WM_NCCreate(HWND hwnd, LPCREATESTRUCTW lpcs)
else if (es->style & WS_BORDER)
SetWindowLongW(hwnd, GWL_STYLE, es->style & ~WS_BORDER);
+ /*
+ * To initialize some final structure members, we call some helper
+ * functions. However, since the EDITSTATE is not consistent (i.e.
+ * not fully initialized), we should be very careful which
+ * functions can be called, and in what order.
+ */
+ EDIT_WM_SetFont(es, 0, FALSE);
+
return TRUE;
cleanup:
@@ -4514,15 +4522,6 @@ static LRESULT EDIT_WM_Create(EDITSTATE *es, const WCHAR *name)
TRACE("%s\n", debugstr_w(name));
- /*
- * To initialize some final structure members, we call some helper
- * functions. However, since the EDITSTATE is not consistent (i.e.
- * not fully initialized), we should be very careful which
- * functions can be called, and in what order.
- */
- EDIT_WM_SetFont(es, 0, FALSE);
- EDIT_EM_EmptyUndoBuffer(es);
-
/* We need to calculate the format rect
(applications may send EM_SETMARGINS before the control gets visible) */
GetClientRect(es->hwndSelf, &clientRect);
--
2.20.1
More information about the wine-devel
mailing list