Author: cwittich
Date: Sat Dec 27 08:26:03 2008
New Revision: 38390
URL:
http://svn.reactos.org/svn/reactos?rev=38390&view=rev
Log:
fix undo after insert date/time
Modified:
trunk/reactos/base/applications/notepad/dialog.c
Modified: trunk/reactos/base/applications/notepad/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] Sat Dec 27 08:26:03
2008
@@ -676,16 +676,15 @@
{
SYSTEMTIME st;
TCHAR szDate[MAX_STRING_LEN];
- static const TCHAR space[] = _T(" ");
+ TCHAR szText[MAX_STRING_LEN * 2 + 2];
GetLocalTime(&st);
GetTimeFormat(LOCALE_USER_DEFAULT, 0, &st, NULL, szDate, MAX_STRING_LEN);
- SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)szDate);
-
- SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)space);
-
+ _tcscpy(szText, szDate);
+ _tcscat(szText, _T(" "));
GetDateFormat(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, szDate,
MAX_STRING_LEN);
+ _tcscat(szText, szDate);
SendMessage(Globals.hEdit, EM_REPLACESEL, TRUE, (LPARAM)szDate);
}