An app left junk in the undo buffer of an edit control upon creation.

This commit is contained in:
Andreas Mohr 1999-02-13 09:04:22 +00:00 committed by Alexandre Julliard
parent 72d8dbe38a
commit 5f5213ade8
1 changed files with 2 additions and 0 deletions

View File

@ -3024,6 +3024,8 @@ static LRESULT EDIT_WM_Create(WND *wnd, EDITSTATE *es, LPCREATESTRUCT32A cs)
* functions can be called, and in what order.
*/
EDIT_WM_SetFont(wnd, es, 0, FALSE);
EDIT_EM_EmptyUndoBuffer(wnd, es);
if (cs->lpszName && *(cs->lpszName) != '\0') {
EDIT_EM_ReplaceSel(wnd, es, FALSE, cs->lpszName);
/* if we insert text to the editline, the text scrolls out of the window, as the caret is placed after the insert pos normally; thus we reset es->selection... to 0 and update caret */