diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-27 00:35:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-27 00:35:25 +0300 |
commit | 2d161955dabcb5a8a8b6069f94945ec7657805bf (patch) | |
tree | 7d7e86e00f0f1f1e935f2e7bb869e5bc125fbc69 /plugins | |
parent | 42e20e76dd64d9f11d2f56dda7888476231dee44 (diff) |
fixes #777 (scrollbars disappeared from tabSRMM)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/chat_window.cpp | 18 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 14 | ||||
-rw-r--r-- | plugins/TabSRMM/src/themes.cpp | 7 | ||||
-rw-r--r-- | plugins/TabSRMM/src/utils.cpp | 2 |
4 files changed, 19 insertions, 22 deletions
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index 4153a2a7b1..70e6fff18a 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -1012,13 +1012,13 @@ LRESULT CChatRoomDlg::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_NCCALCSIZE: - return CSkin::NcCalcRichEditFrame(m_log.GetHwnd(), this, ID_EXTBKHISTORY, msg, wParam, lParam, nullptr); + return CSkin::NcCalcRichEditFrame(m_log.GetHwnd(), this, ID_EXTBKHISTORY, msg, wParam, lParam, stubLogProc); case WM_NCPAINT: - return CSkin::DrawRichEditFrame(m_log.GetHwnd(), this, ID_EXTBKHISTORY, msg, wParam, lParam, nullptr); + return CSkin::DrawRichEditFrame(m_log.GetHwnd(), this, ID_EXTBKHISTORY, msg, wParam, lParam, stubLogProc); case WM_COPY: - return Utils::WMCopyHandler(m_log.GetHwnd(), nullptr, msg, wParam, lParam); + return Utils::WMCopyHandler(m_log.GetHwnd(), stubLogProc, msg, wParam, lParam); case WM_SETCURSOR: if (g_Settings.bClickableNicks && (LOWORD(lParam) == HTCLIENT)) { @@ -1063,7 +1063,7 @@ LRESULT CChatRoomDlg::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) return TRUE; } if (wParam == VK_INSERT && GetKeyState(VK_CONTROL) & 0x8000) - return Utils::WMCopyHandler(m_log.GetHwnd(), nullptr, msg, wParam, lParam); + return Utils::WMCopyHandler(m_log.GetHwnd(), stubLogProc, msg, wParam, lParam); break; case WM_SYSKEYUP: @@ -1092,7 +1092,7 @@ LRESULT CChatRoomDlg::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) bool isCtrl, isShift, isAlt; KbdState(isShift, isCtrl, isAlt); if (wParam == 0x03 && isCtrl) // Ctrl+C - return Utils::WMCopyHandler(m_log.GetHwnd(), nullptr, msg, wParam, lParam); + return Utils::WMCopyHandler(m_log.GetHwnd(), stubLogProc, msg, wParam, lParam); break; } @@ -1113,10 +1113,10 @@ LRESULT CChatRoomDlg::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) switch (msg) { case WM_NCCALCSIZE: - return CSkin::NcCalcRichEditFrame(m_message.GetHwnd(), this, ID_EXTBKINPUTAREA, msg, wParam, lParam, nullptr); + return CSkin::NcCalcRichEditFrame(m_message.GetHwnd(), this, ID_EXTBKINPUTAREA, msg, wParam, lParam, stubMessageProc); case WM_NCPAINT: - return CSkin::DrawRichEditFrame(m_message.GetHwnd(), this, ID_EXTBKINPUTAREA, msg, wParam, lParam, nullptr); + return CSkin::DrawRichEditFrame(m_message.GetHwnd(), this, ID_EXTBKINPUTAREA, msg, wParam, lParam, stubMessageProc); case WM_CONTEXTMENU: POINT pt; @@ -1459,10 +1459,10 @@ LRESULT CChatRoomDlg::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam) LONG itemHeight = m_nickList.SendMsg(LB_GETITEMHEIGHT, 0, 0); g_cLinesPerPage = (lpRect.bottom - lpRect.top) / itemHeight; } - return CSkin::NcCalcRichEditFrame(m_nickList.GetHwnd(), this, ID_EXTBKUSERLIST, msg, wParam, lParam, nullptr); + return CSkin::NcCalcRichEditFrame(m_nickList.GetHwnd(), this, ID_EXTBKUSERLIST, msg, wParam, lParam, stubNicklistProc); case WM_NCPAINT: - return CSkin::DrawRichEditFrame(m_nickList.GetHwnd(), this, ID_EXTBKUSERLIST, msg, wParam, lParam, nullptr); + return CSkin::DrawRichEditFrame(m_nickList.GetHwnd(), this, ID_EXTBKUSERLIST, msg, wParam, lParam, stubNicklistProc); case WM_MOUSEWHEEL: if (CSkin::m_DisableScrollbars) { diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 05993c906a..8f73008fb2 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1878,7 +1878,7 @@ LRESULT CSrmmWindow::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) case WM_CHAR:
KbdState(isShift, isCtrl, isAlt);
if (wParam == 0x03 && isCtrl) // Ctrl+C
- return Utils::WMCopyHandler(m_log.GetHwnd(), nullptr, msg, wParam, lParam);
+ return Utils::WMCopyHandler(m_log.GetHwnd(), stubLogProc, msg, wParam, lParam);
if (wParam == 0x11 && isCtrl) // Ctrl+Q
m_btnQuote.OnClick(&m_btnQuote);
break;
@@ -1908,17 +1908,17 @@ LRESULT CSrmmWindow::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam) case WM_KEYDOWN:
KbdState(isShift, isCtrl, isAlt);
if (wParam == VK_INSERT && isCtrl)
- return Utils::WMCopyHandler(m_log.GetHwnd(), nullptr, msg, wParam, lParam);
+ return Utils::WMCopyHandler(m_log.GetHwnd(), stubLogProc, msg, wParam, lParam);
break;
case WM_COPY:
- return Utils::WMCopyHandler(m_log.GetHwnd(), nullptr, msg, wParam, lParam);
+ return Utils::WMCopyHandler(m_log.GetHwnd(), stubLogProc, msg, wParam, lParam);
case WM_NCCALCSIZE:
- return CSkin::NcCalcRichEditFrame(m_log.GetHwnd(), this, ID_EXTBKHISTORY, msg, wParam, lParam, nullptr);
+ return CSkin::NcCalcRichEditFrame(m_log.GetHwnd(), this, ID_EXTBKHISTORY, msg, wParam, lParam, stubLogProc);
case WM_NCPAINT:
- return CSkin::DrawRichEditFrame(m_log.GetHwnd(), this, ID_EXTBKHISTORY, msg, wParam, lParam, nullptr);
+ return CSkin::DrawRichEditFrame(m_log.GetHwnd(), this, ID_EXTBKHISTORY, msg, wParam, lParam, stubLogProc);
case WM_CONTEXTMENU:
POINT pt;
@@ -1960,10 +1960,10 @@ LRESULT CSrmmWindow::WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam) switch (msg) {
case WM_NCCALCSIZE:
- return CSkin::NcCalcRichEditFrame(m_message.GetHwnd(), this, ID_EXTBKINPUTAREA, msg, wParam, lParam, nullptr);
+ return CSkin::NcCalcRichEditFrame(m_message.GetHwnd(), this, ID_EXTBKINPUTAREA, msg, wParam, lParam, stubMessageProc);
case WM_NCPAINT:
- return CSkin::DrawRichEditFrame(m_message.GetHwnd(), this, ID_EXTBKINPUTAREA, msg, wParam, lParam, nullptr);
+ return CSkin::DrawRichEditFrame(m_message.GetHwnd(), this, ID_EXTBKINPUTAREA, msg, wParam, lParam, stubMessageProc);
case WM_DROPFILES:
SendMessage(m_hwnd, WM_DROPFILES, (WPARAM)wParam, (LPARAM)lParam);
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index 749e08ab01..884f952efa 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -1930,7 +1930,7 @@ UINT CSkin::NcCalcRichEditFrame(HWND hwnd, const CTabBaseDlg *mwdat, UINT skinID ShowScrollBar(hwnd, SB_VERT, FALSE);
}
- LRESULT orig = (MyWndProc == nullptr) ? WVR_REDRAW : mir_callNextSubclass(hwnd, MyWndProc, msg, wParam, lParam);
+ LRESULT orig = mir_callNextSubclass(hwnd, MyWndProc, msg, wParam, lParam);
if (mwdat == nullptr)
return orig;
@@ -1950,10 +1950,7 @@ UINT CSkin::NcCalcRichEditFrame(HWND hwnd, const CTabBaseDlg *mwdat, UINT skinID bReturn = TRUE;
}
ReleaseDC(GetParent(hwnd), hdc);
- if (bReturn)
- return WVR_REDRAW;
- else
- return orig;
+ return (bReturn) ? WVR_REDRAW : orig;
}
if ((mwdat->m_sendMode & SMODE_MULTIPLE || mwdat->m_sendMode & SMODE_CONTAINER ||
mwdat->m_bEditNotesActive || mwdat->m_sendMode & SMODE_SENDLATER) && skinID == ID_EXTBKINPUTAREA) {
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index d75ca8664e..a343d6fae8 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -982,7 +982,7 @@ size_t Utils::CopyToClipBoard(const wchar_t *str, const HWND hwndOwner) LRESULT Utils::WMCopyHandler(HWND hwnd, WNDPROC oldWndProc, UINT msg, WPARAM wParam, LPARAM lParam)
{
- LRESULT result = (oldWndProc == nullptr) ? 0 : mir_callNextSubclass(hwnd, oldWndProc, msg, wParam, lParam);
+ LRESULT result = mir_callNextSubclass(hwnd, oldWndProc, msg, wParam, lParam);
ptrA szFromStream(Message_GetFromStream(hwnd, SF_TEXT | SFF_SELECTION));
if (szFromStream != nullptr) {
|