summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-27 00:35:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-27 00:35:25 +0300
commit2d161955dabcb5a8a8b6069f94945ec7657805bf (patch)
tree7d7e86e00f0f1f1e935f2e7bb869e5bc125fbc69
parent42e20e76dd64d9f11d2f56dda7888476231dee44 (diff)
fixes #777 (scrollbars disappeared from tabSRMM)
-rw-r--r--include/m_chat_int.h5
-rw-r--r--libs/win32/mir_app.libbin116674 -> 117320 bytes
-rw-r--r--libs/win64/mir_app.libbin112228 -> 112814 bytes
-rw-r--r--plugins/TabSRMM/src/chat_window.cpp18
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp14
-rw-r--r--plugins/TabSRMM/src/themes.cpp7
-rw-r--r--plugins/TabSRMM/src/utils.cpp2
-rw-r--r--src/mir_app/src/mir_app.def3
-rw-r--r--src/mir_app/src/mir_app64.def3
-rw-r--r--src/mir_app/src/srmm_base.cpp6
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp2
11 files changed, 34 insertions, 26 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h
index 375035b9a2..8a16ccc3f1 100644
--- a/include/m_chat_int.h
+++ b/include/m_chat_int.h
@@ -394,6 +394,11 @@ EXTERN_C MIR_APP_DLL(BOOL) Chat_DoEventHook(SESSION_INFO *si, int iType, const U
EXTERN_C MIR_APP_DLL(UINT) Chat_CreateGCMenu(HWND hwnd, HMENU hMenu, POINT pt, SESSION_INFO *si, const wchar_t *pszUID, const wchar_t *pszWordText);
EXTERN_C MIR_APP_DLL(void) Chat_DestroyGCMenu(HMENU hMenu, int iIndex);
+// message procedures' stubs
+EXTERN_C MIR_APP_DLL(LRESULT) CALLBACK stubLogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+EXTERN_C MIR_APP_DLL(LRESULT) CALLBACK stubMessageProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+EXTERN_C MIR_APP_DLL(LRESULT) CALLBACK stubNicklistProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+
/////////////////////////////////////////////////////////////////////////////////////////
#include <chat_resource.h>
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index 0a53175fda..050dde2721 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index e53221b3a0..f832860c08 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
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) {
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 0657e1546c..f7fa45ce1d 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -440,3 +440,6 @@ Chat_AddMenuItems @442 NONAME
Chat_DestroyGCMenu @443 NONAME
Chat_CreateGCMenu @444 NONAME
Chat_DoEventHook @445 NONAME
+_stubLogProc@16 @446 NONAME
+_stubMessageProc@16 @447 NONAME
+_stubNicklistProc@16 @448 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 9a40194286..0d7fce7403 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -440,3 +440,6 @@ Chat_AddMenuItems @442 NONAME
Chat_DestroyGCMenu @443 NONAME
Chat_CreateGCMenu @444 NONAME
Chat_DoEventHook @445 NONAME
+stubLogProc @446 NONAME
+stubMessageProc @447 NONAME
+stubNicklistProc @448 NONAME
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp
index 8dbb2ad409..01b401f1f2 100644
--- a/src/mir_app/src/srmm_base.cpp
+++ b/src/mir_app/src/srmm_base.cpp
@@ -147,7 +147,7 @@ static LRESULT CALLBACK Srmm_ButtonSubclassProc(HWND hwnd, UINT msg, WPARAM wPar
/////////////////////////////////////////////////////////////////////////////////////////
-static LRESULT CALLBACK stubLogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+EXTERN_C MIR_APP_DLL(LRESULT) CALLBACK stubLogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA);
if (pDlg != nullptr)
@@ -303,7 +303,7 @@ LRESULT CSrmmBaseDialog::WndProc_Log(UINT msg, WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
-static LRESULT CALLBACK stubMessageProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+EXTERN_C MIR_APP_DLL(LRESULT) CALLBACK stubMessageProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA);
if (pDlg != nullptr)
@@ -428,7 +428,7 @@ static void CALLBACK ChatTimerProc(HWND hwnd, UINT, UINT_PTR idEvent, DWORD)
KillTimer(hwnd, idEvent);
}
-static LRESULT CALLBACK stubNicklistProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+EXTERN_C MIR_APP_DLL(LRESULT) CALLBACK stubNicklistProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
CSrmmBaseDialog *pDlg = (CSrmmBaseDialog*)GetWindowLongPtr(GetParent(hwnd), GWLP_USERDATA);
if (pDlg != nullptr)
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index 9f598d3f8c..8517637822 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -731,7 +731,7 @@ public:
void OnTreeItemChanged(void*)
{
- int iNewState = !m_toolBar.GetCheckState(m_toolBar.GetSelection());
+ bool iNewState = !m_toolBar.GetCheckState(m_toolBar.GetSelection());
m_btnIM.Enable(iNewState);
m_btnChat.Enable(iNewState);
m_btnHidden.Enable(iNewState);