diff options
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 16 | ||||
-rw-r--r-- | plugins/TabSRMM/src/controls.cpp | 40 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 1 |
3 files changed, 29 insertions, 28 deletions
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index dbacffea65..fc69c6d6fa 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -162,15 +162,15 @@ void CChatRoomDlg::UpdateWindowState(UINT msg) } } - if (si->hwndStatus) { + if (m_hwndFilter) { POINT pt; GetCursorPos(&pt); RECT rcFilter; - GetWindowRect(si->hwndStatus, &rcFilter); + GetWindowRect(m_hwndFilter, &rcFilter); if (!PtInRect(&rcFilter, pt)) { - SendMessage(si->hwndStatus, WM_CLOSE, 1, 1); - si->hwndStatus = 0; + SendMessage(m_hwndFilter, WM_CLOSE, 1, 1); + m_hwndFilter = 0; } } @@ -2447,17 +2447,17 @@ LABEL_SHOWWINDOW: break; case GC_SHOWFILTERMENU: - si->hwndStatus = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_FILTER), m_pContainer->hwnd, FilterWndProc, (LPARAM)si); - TranslateDialogDefault(si->hwndStatus); + m_hwndFilter = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_FILTER), m_pContainer->hwnd, FilterWndProc, (LPARAM)si); + TranslateDialogDefault(m_hwndFilter); RECT rcFilter; - GetClientRect(si->hwndStatus, &rcFilter); + GetClientRect(m_hwndFilter, &rcFilter); GetWindowRect(m_log.GetHwnd(), &rcLog); pt.x = rcLog.right; pt.y = rcLog.bottom; ScreenToClient(m_pContainer->hwnd, &pt); - SetWindowPos(si->hwndStatus, HWND_TOP, pt.x - rcFilter.right, pt.y - rcFilter.bottom, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW); + SetWindowPos(m_hwndFilter, HWND_TOP, pt.x - rcFilter.right, pt.y - rcFilter.bottom, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW); break; case GC_SHOWCOLORCHOOSER: diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index ed30146c8f..c316631617 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -880,28 +880,28 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR }
return 0;
+ case WM_USER + 101:
// tell status bar to update the part layout (re-calculate part widths)
// needed when an icon is added to or removed from the icon area
- case WM_USER + 101:
- {
- int list_icons = 0;
- dat = (CSrmmWindow*)lParam;
- if (dat)
- while (Srmm_GetNthIcon(dat->m_hContact, list_icons))
- list_icons++;
-
- SendMessage(hWnd, WM_SIZE, 0, 0);
-
- RECT rcs;
- GetWindowRect(hWnd, &rcs);
-
- int statwidths[5];
- statwidths[0] = (rcs.right - rcs.left) - (2 * SB_CHAR_WIDTH + 20) - (list_icons * (PluginConfig.m_smcxicon + 2));
- statwidths[1] = (rcs.right - rcs.left) - (10 + (list_icons * (PluginConfig.m_smcxicon + 2)));
- statwidths[2] = -1;
- SendMessage(hWnd, SB_SETPARTS, 3, (LPARAM)statwidths);
- }
- return 0;
+ {
+ int list_icons = 0;
+ dat = (CSrmmWindow*)lParam;
+ if (dat)
+ while (Srmm_GetNthIcon(dat->m_hContact, list_icons))
+ list_icons++;
+
+ SendMessage(hWnd, WM_SIZE, 0, 0);
+
+ RECT rcs;
+ GetWindowRect(hWnd, &rcs);
+
+ int statwidths[5];
+ statwidths[0] = (rcs.right - rcs.left) - (2 * SB_CHAR_WIDTH + 20) - (list_icons * (PluginConfig.m_smcxicon + 2));
+ statwidths[1] = (rcs.right - rcs.left) - (10 + (list_icons * (PluginConfig.m_smcxicon + 2)));
+ statwidths[2] = -1;
+ SendMessage(hWnd, SB_SETPARTS, 3, (LPARAM)statwidths);
+ }
+ return 0;
case WM_SETCURSOR:
GetCursorPos(&pt);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 74c61465a5..830f2b5469 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -478,6 +478,7 @@ public: class CChatRoomDlg : public CTabBaseDlg
{
+ HWND m_hwndFilter;
bool m_bWasDeleted;
CCtrlButton m_btnFilter, m_btnHistory, m_btnOk;
CCtrlButton m_btnBold, m_btnItalic, m_btnUnderline, m_btnColor, m_btnBkColor;
|