diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-08 13:30:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-08 13:30:20 +0300 |
commit | 5d6c01bca4fa66148b55f42f426c17ebe74fb4cb (patch) | |
tree | 998aaf950edc6c78a535ac6d85443f06a0312d3d /plugins/TabSRMM | |
parent | 1a6f8de0cfcff7500258b8b048b7216d5dc26dc9 (diff) |
fix for the wrong type cast
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/globals.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 24 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 2 |
3 files changed, 13 insertions, 15 deletions
diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h index 61fcb4c966..244a7f68f8 100644 --- a/plugins/TabSRMM/src/globals.h +++ b/plugins/TabSRMM/src/globals.h @@ -32,7 +32,7 @@ struct TSplitterBroadCast {
TContainerData *pSrcContainer;
- CSrmmWindow *pSrcDat;
+ CTabBaseDlg *pSrcDat;
LONG pos, pos_chat;
LONG off_chat, off_im;
LPARAM lParam;
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 2a6879c258..e82ef3c55a 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -786,7 +786,7 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM {
RECT rc;
HWND hwndParent = GetParent(hwnd);
- CSrmmWindow *dat = (CSrmmWindow*)GetWindowLongPtr(hwndParent, GWLP_USERDATA);
+ CTabBaseDlg *dat = (CTabBaseDlg*)GetWindowLongPtr(hwndParent, GWLP_USERDATA);
switch (msg) {
case WM_NCHITTEST:
@@ -798,13 +798,11 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM return TRUE;
case WM_LBUTTONDOWN:
- if (hwnd == GetDlgItem(hwndParent, IDC_SPLITTERY) || hwnd == GetDlgItem(hwndParent, IDC_SPLITTERY)) {
- if (dat) {
- GetClientRect(hwnd, &rc);
- dat->m_iSavedMultiSplit = rc.right > rc.bottom ? (short)HIWORD(GetMessagePos()) + rc.bottom / 2 : (short)LOWORD(GetMessagePos()) + rc.right / 2;
- dat->m_savedSplitterY = dat->m_iSplitterY;
- dat->m_savedDynaSplit = dat->m_dynaSplitter;
- }
+ if (hwnd == GetDlgItem(hwndParent, IDC_SPLITTERY)) {
+ GetClientRect(hwnd, &rc);
+ dat->m_iSavedMultiSplit = rc.right > rc.bottom ? (short)HIWORD(GetMessagePos()) + rc.bottom / 2 : (short)LOWORD(GetMessagePos()) + rc.right / 2;
+ dat->m_savedSplitterY = dat->m_iSplitterY;
+ dat->m_savedDynaSplit = dat->m_dynaSplitter;
}
SetCapture(hwnd);
return 0;
@@ -845,22 +843,22 @@ LRESULT CALLBACK SplitterSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM ReleaseCapture();
dat->DM_ScrollToBottom(0, 1);
- if (dat && dat->m_bType == SESSIONTYPE_IM && hwnd == GetDlgItem(hwndParent, IDC_PANELSPLITTER)) {
+ if (dat->m_bType == SESSIONTYPE_IM && hwnd == GetDlgItem(hwndParent, IDC_PANELSPLITTER)) {
SendMessage(hwndParent, WM_SIZE, 0, 0);
RedrawWindow(hwndParent, NULL, NULL, RDW_ALLCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW);
}
- else if ((dat && dat->m_bType == SESSIONTYPE_IM && hwnd == GetDlgItem(hwndParent, IDC_SPLITTERY)) ||
- (dat && dat->m_bType == SESSIONTYPE_CHAT && hwnd == GetDlgItem(hwndParent, IDC_SPLITTERY))) {
- POINT pt;
- int selection;
+ else if (hwnd == GetDlgItem(hwndParent, IDC_SPLITTERY)) {
HMENU hMenu = GetSubMenu(PluginConfig.g_hMenuContext, 12);
LONG messagePos = GetMessagePos();
GetClientRect(hwnd, &rc);
if (hwndCapture != hwnd || dat->m_iSavedMultiSplit == (rc.right > rc.bottom ? (short)HIWORD(messagePos) + rc.bottom / 2 : (short)LOWORD(messagePos) + rc.right / 2))
break;
+
+ POINT pt;
GetCursorPos(&pt);
+ int selection;
if (dat->m_bIsAutosizingInput)
selection = ID_SPLITTERCONTEXT_SETPOSITIONFORTHISSESSION;
else
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 4d0fac44b9..41cf2febae 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -282,6 +282,7 @@ public: int m_originalSplitterY;
int m_iSplitterY, m_dynaSplitter;
int m_savedSplitterY, m_savedDynaSplit;
+ int m_iSavedMultiSplit, m_iMultiSplit;
SIZE m_minEditBoxSize;
int m_nTypeSecs;
int m_nTypeMode;
@@ -439,7 +440,6 @@ class CSrmmWindow : public CTabBaseDlg public:
int msgTop, rcLogBottom;
- int m_iSavedMultiSplit, m_iMultiSplit;
wchar_t *wszInitialText;
bool m_bActivate, m_bWantPopup;
|