diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 15 | ||||
-rw-r--r-- | src/core/stdmsg/src/tabs.cpp | 27 |
2 files changed, 27 insertions, 15 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index c3ed9caeee..3964004faa 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -1266,11 +1266,6 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (dis->CtlType == ODT_MENU)
return Menu_DrawItem(lParam);
- if (dis->hwndItem == m_pOwner->m_hwndStatus) {
- DrawStatusIcons(m_hContact, dis->hDC, dis->rcItem, 2);
- return TRUE;
- }
-
if (dis->CtlID == IDC_AVATAR && m_avatarPic && g_dat.bShowAvatar) {
HPEN hPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
HPEN hOldPen = (HPEN)SelectObject(dis->hDC, hPen);
@@ -1344,16 +1339,6 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) break;
case WM_NOTIFY:
- if (((LPNMHDR)lParam)->hwndFrom == m_pOwner->m_hwndStatus) {
- if (((LPNMHDR)lParam)->code == NM_CLICK || ((LPNMHDR)lParam)->code == NM_RCLICK) {
- NMMOUSE *nm = (NMMOUSE *)lParam;
- SendMessage(m_pOwner->m_hwndStatus, SB_GETRECT, SendMessage(m_pOwner->m_hwndStatus, SB_GETPARTS, 0, 0) - 1, (LPARAM)&rc);
- if (nm->pt.x >= rc.left)
- CheckStatusIconClick(m_hContact, m_pOwner->m_hwndStatus, nm->pt, rc, 2, ((LPNMHDR)lParam)->code == NM_RCLICK ? MBCF_RIGHTBUTTON : 0);
- return TRUE;
- }
- }
-
HCURSOR hCur;
switch (((LPNMHDR)lParam)->idFrom) {
case IDC_SRMM_LOG:
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp index 4826653607..8b0e38043e 100644 --- a/src/core/stdmsg/src/tabs.cpp +++ b/src/core/stdmsg/src/tabs.cpp @@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "stdafx.h" +#include "statusicon.h" struct CSavedTab { @@ -545,7 +546,33 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) SaveWindowPosition(false); break; + case WM_DRAWITEM: + { + LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam; + if (dis->hwndItem == m_hwndStatus) { + CSrmmBaseDialog *pDlg = (g_Settings.bTabsEnable) ? (CSrmmBaseDialog*)m_tab.GetActivePage() : m_pEmbed; + if (pDlg != nullptr) + DrawStatusIcons(pDlg->m_hContact, dis->hDC, dis->rcItem, 2); + return TRUE; + } + } + break; + case WM_NOTIFY: + if (((LPNMHDR)lParam)->hwndFrom == m_hwndStatus) { + if (((LPNMHDR)lParam)->code == NM_CLICK || ((LPNMHDR)lParam)->code == NM_RCLICK) { + NMMOUSE *nm = (NMMOUSE *)lParam; + RECT rc; + SendMessage(m_hwndStatus, SB_GETRECT, SendMessage(m_hwndStatus, SB_GETPARTS, 0, 0) - 1, (LPARAM)&rc); + if (nm->pt.x >= rc.left) { + CSrmmBaseDialog *pDlg = (g_Settings.bTabsEnable) ? (CSrmmBaseDialog*)m_tab.GetActivePage() : m_pEmbed; + if (pDlg != nullptr) + CheckStatusIconClick(pDlg->m_hContact, m_hwndStatus, nm->pt, rc, 2, ((LPNMHDR)lParam)->code == NM_RCLICK ? MBCF_RIGHTBUTTON : 0); + } + return TRUE; + } + } + if (((LPNMHDR)lParam)->idFrom == IDC_TAB) { switch (((LPNMHDR)lParam)->code) { case TCN_SELCHANGE: |