fixed another makensisw bug (two stray chars after text for me) -- hopefully this didn't break anything

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1264 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
justin1014 2002-10-02 04:26:57 +00:00
parent 280922d116
commit a4366836ab
2 changed files with 3 additions and 2 deletions

View file

@ -69,7 +69,8 @@ void ClearLog(HWND hwnd) {
}
void LogMessage(HWND hwnd,const char *str) {
DWORD dwLength = SendDlgItemMessage(hwnd, IDC_LOGWIN, WM_GETTEXTLENGTH, 0, 0);
GETTEXTLENGTHEX tl={GTL_DEFAULT,CP_ACP};
DWORD dwLength = SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_GETTEXTLENGTHEX, (WPARAM)&tl, 0);
SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_SETSEL, dwLength, dwLength);
SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_REPLACESEL, 0, (WPARAM)str);
SendDlgItemMessage(hwnd, IDC_LOGWIN, EM_SCROLLCARET, 0, 0);