diff options
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 22 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 16 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/taskbar.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/taskbar.h | 4 |
5 files changed, 15 insertions, 32 deletions
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index ef2e85a2d3..8f0d33b4f4 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2350,26 +2350,6 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP } return 0; - case DM_FORCESCROLL: - if (wParam == 0 && lParam == 0) - DM_ScrollToBottom(dat, 0, 1); - else { - SCROLLINFO *psi = (SCROLLINFO*)lParam; - POINT *ppt = (POINT*)wParam; - - 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); - } - - if (psi == NULL || psi->nPos >= psi->nMax - (int)psi->nPage - 5 || psi->nMax - psi->nMin - (int)psi->nPage < 50) - DM_ScrollToBottom(dat, 0, 0); - else - SendMessage((dat->hwndIEView || dat->hwndHPP) ? (dat->hwndIEView ? dat->hwndIEView : dat->hwndHPP) : hwndLog, EM_SETSCROLLPOS, 0, (LPARAM)ppt); - } - return 0; - case HM_DBEVENTADDED: // this is called whenever a new event has been added to the database. // this CAN be posted (some sanity checks required). @@ -2552,7 +2532,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP else { SendMessage(hwndDlg, WM_SIZE, 0, 0); if (lParam == 0) - PostMessage(hwndDlg, DM_FORCESCROLL, 0, 0); + DM_ScrollToBottom(dat, 0, 1); } return 0; 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);
}
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 2878a5243c..dea409bdab 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -526,7 +526,6 @@ struct TNewWindowData #define DM_QUERYHCONTACT (TM_USER+41)
#define DM_DEFERREDREMAKELOG (TM_USER+42)
#define DM_RESTOREWINDOWPOS (TM_USER+43)
-#define DM_FORCESCROLL (TM_USER+44)
#define DM_QUERYCLIENTAREA (TM_USER+45)
#define DM_QUERYRECENT (TM_USER+47)
#define DM_ACTIVATEME (TM_USER+46)
diff --git a/plugins/TabSRMM/src/taskbar.cpp b/plugins/TabSRMM/src/taskbar.cpp index b594845180..e6141f0937 100644 --- a/plugins/TabSRMM/src/taskbar.cpp +++ b/plugins/TabSRMM/src/taskbar.cpp @@ -224,7 +224,7 @@ void CProxyWindow::verify(TWindowData *dat) * and previews for a message session.
* each tab has one invisible proxy window
*/
-CProxyWindow::CProxyWindow(const TWindowData *dat)
+CProxyWindow::CProxyWindow(TWindowData *dat)
{
m_dat = dat;
m_hBigIcon = 0;
@@ -340,7 +340,7 @@ void CProxyWindow::sendPreview() ::SendMessage(m_dat->pContainer->hwnd, DM_QUERYCLIENTAREA, 0, (LPARAM)&rcClient);
::MoveWindow(m_dat->hwnd, rcClient.left, rcClient.top, (rcClient.right - rcClient.left), (rcClient.bottom - rcClient.top), FALSE);
::SendMessage(m_dat->hwnd, WM_SIZE, 0, 0);
- ::SendMessage(m_dat->hwnd, DM_FORCESCROLL, 0, 0);
+ DM_ScrollToBottom(m_dat, 0, 1);
}
/*
* a minimized container has a null rect as client area, so do not use it
diff --git a/plugins/TabSRMM/src/taskbar.h b/plugins/TabSRMM/src/taskbar.h index 364da9e582..5e16e2ce1c 100644 --- a/plugins/TabSRMM/src/taskbar.h +++ b/plugins/TabSRMM/src/taskbar.h @@ -97,7 +97,7 @@ private: class CProxyWindow
{
public:
- CProxyWindow(const TWindowData *dat);
+ CProxyWindow(TWindowData *dat);
~CProxyWindow();
void updateIcon(const HICON hIcon) const;
@@ -120,7 +120,7 @@ public: static void verify(TWindowData *dat);
private:
- const TWindowData *m_dat;
+ TWindowData *m_dat;
HWND m_hwndProxy;
LONG m_width, m_height;
|