From 6dc55b10b2eebbdb24d592667fcb353432c4d8d3 Mon Sep 17 00:00:00 2001 From: kichik Date: Thu, 12 Sep 2002 16:16:50 +0000 Subject: [PATCH] Now logs as should even if text is selected/cart positions changes git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@990 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Makensisw/utils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Contrib/Makensisw/utils.cpp b/Contrib/Makensisw/utils.cpp index e26e767d..03350da9 100644 --- a/Contrib/Makensisw/utils.cpp +++ b/Contrib/Makensisw/utils.cpp @@ -60,9 +60,10 @@ char *g_input_script; extern BOOL g_warnings; void LogMessage(HWND hwnd,const char *str) { - SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_SETSEL, -1, 0); + DWORD dwLength = SendDlgItemMessage(hwnd, IDC_LOGWIN, WM_GETTEXTLENGTH, 0, 0); + SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_SETSEL, dwLength, dwLength); SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_REPLACESEL, 0, (WPARAM)str); - SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_SCROLLCARET, /*SB_BOTTOM*/0, 0); + SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_SCROLLCARET, 0, 0); } void ErrorMessage(HWND hwnd,const char *str) {