summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msglog.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-12-29 09:26:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-12-29 09:26:02 +0000
commitc5d063641ee1d9e0a4ca9872fbc4d1578731d9a6 (patch)
treeeb77a34e1690eee9d65d36f9feab233f72eac5cc /plugins/TabSRMM/src/msglog.cpp
parentbd276bf08cc7ae0c2c9be6b0c202047fede7c704 (diff)
unused DM_FORCESCROLL removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@11666 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/msglog.cpp')
-rw-r--r--plugins/TabSRMM/src/msglog.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 51ee2d523a..6a62cba9d9 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -1353,12 +1353,16 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp
ReplaceIcons(hwndDlg, dat, startAt, fAppend, isSent);
dat->clr_added = FALSE;
- SCROLLINFO si = { 0 };
- si.cbSize = sizeof(si);
- SendMessage(hwndDlg, DM_FORCESCROLL, (WPARAM)&pt, (LPARAM)&si);
-
- SendDlgItemMessage(hwndDlg, IDC_LOG, WM_SETREDRAW, TRUE, 0);
- InvalidateRect(GetDlgItem(hwndDlg, IDC_LOG), NULL, FALSE);
+ HWND hwndLog = GetDlgItem(hwndDlg, IDC_LOG);
+ if (dat->hwndIEView == 0 && dat->hwndHPP == 0) {
+ int len = GetWindowTextLength(hwndLog);
+ SendMessage(hwndLog, EM_SETSEL, len - 1, len - 1);
+ }
+
+ DM_ScrollToBottom(dat, 0, 0);
+
+ SendMessage(hwndLog, WM_SETREDRAW, TRUE, 0);
+ InvalidateRect(hwndLog, NULL, FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_QUOTE), dat->hDbEventLast != NULL);
mir_free(streamData.buffer);
}