From 4ac8a5589cd54abe47f1c80c67b2a8265764528a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Dec 2017 15:57:50 +0300 Subject: TabSRMM: - custom color chooser removed; - unused menu items removed; - version bump --- plugins/TabSRMM/src/msgdlgutils.cpp | 53 ++----------------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) (limited to 'plugins/TabSRMM/src/msgdlgutils.cpp') diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 125f6c140b..85fffcb7c7 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1378,57 +1378,8 @@ void CTabBaseDlg::HandlePasteAndSend() // draw various elements of the message window, like avatar(s), info panel fields // and the color formatting menu -int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam) +int CTabBaseDlg::MsgWindowDrawHandler(DRAWITEMSTRUCT *dis) { - LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam; - if (dis->CtlType == ODT_MENU && dis->hwndItem == (HWND)GetSubMenu(PluginConfig.g_hMenuContext, 7)) { - RECT rc = { 0 }; - HBRUSH old, col; - COLORREF clr; - switch (dis->itemID) { - case ID_FONT_RED: - clr = RGB(255, 0, 0); - break; - case ID_FONT_BLUE: - clr = RGB(0, 0, 255); - break; - case ID_FONT_GREEN: - clr = RGB(0, 255, 0); - break; - case ID_FONT_MAGENTA: - clr = RGB(255, 0, 255); - break; - case ID_FONT_YELLOW: - clr = RGB(255, 255, 0); - break; - case ID_FONT_WHITE: - clr = RGB(255, 255, 255); - break; - case ID_FONT_DEFAULTCOLOR: - clr = GetSysColor(COLOR_MENU); - break; - case ID_FONT_CYAN: - clr = RGB(0, 255, 255); - break; - case ID_FONT_BLACK: - clr = RGB(0, 0, 0); - break; - default: - clr = 0; - } - col = (HBRUSH)CreateSolidBrush(clr); - old = (HBRUSH)SelectObject(dis->hDC, col); - rc.left = 2; - rc.top = dis->rcItem.top - 5; - rc.right = 15; - rc.bottom = dis->rcItem.bottom + 4; - Rectangle(dis->hDC, rc.left - 1, rc.top - 1, rc.right + 1, rc.bottom + 1); - FillRect(dis->hDC, &rc, col); - SelectObject(dis->hDC, old); - DeleteObject(col); - return TRUE; - } - HBITMAP hbmAvatar = m_ace ? m_ace->hbmPic : PluginConfig.g_hbmUnknown; if ((dis->hwndItem == GetDlgItem(m_hwnd, IDC_CONTACTPIC) && m_bShowAvatar) || (dis->hwndItem == m_hwnd && m_pPanel.isActive())) { if (hbmAvatar == nullptr) @@ -1570,7 +1521,7 @@ int CTabBaseDlg::MsgWindowDrawHandler(WPARAM, LPARAM lParam) return TRUE; } - return Menu_DrawItem(lParam); + return Menu_DrawItem((LPARAM)dis); } void TSAPI LoadThemeDefaults(TContainerData *pContainer) -- cgit v1.2.3