diff options
author | George Hazan <ghazan@miranda.im> | 2016-11-21 16:16:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-11-21 16:16:39 +0300 |
commit | 668495e396bf9752411d1f134f88da4ff3b88b0a (patch) | |
tree | 8bd97778560909c182b4e2a3d121e957667ae621 /plugins/TabSRMM/src/generic_msghandlers.cpp | |
parent | ff15ab0d0a9053c6bddb015c1cd7665c7c65b35d (diff) |
fix for badly working font color button in tabsrmm
Diffstat (limited to 'plugins/TabSRMM/src/generic_msghandlers.cpp')
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index deabffb765..1d636d1fe3 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -248,39 +248,6 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *pContainer, T } break; - case IDC_FONTFACE: - submenu = GetSubMenu(PluginConfig.g_hMenuContext, 7); - { - CHARFORMAT2 cf; - memset(&cf, 0, sizeof(CHARFORMAT2)); - cf.cbSize = sizeof(CHARFORMAT2); - cf.dwMask = CFM_COLOR; - - GetWindowRect(GetDlgItem(hwndDlg, IDC_FONTFACE), &rc); - iSelection = TrackPopupMenu(submenu, TPM_RETURNCMD, rc.left, rc.bottom, 0, hwndDlg, NULL); - if (iSelection == ID_FONT_CLEARALLFORMATTING) { - cf.dwMask = CFM_BOLD | CFM_COLOR | CFM_ITALIC | CFM_UNDERLINE | CFM_STRIKEOUT; - cf.crTextColor = M.GetDword(FONTMODULE, "Font16Col", 0); - SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf); - break; - } - if (iSelection == ID_FONT_DEFAULTCOLOR) { - cf.crTextColor = M.GetDword(FONTMODULE, "Font16Col", 0); - for (int i = 0; i < Utils::rtf_ctable_size; i++) - if (Utils::rtf_ctable[i].clr == cf.crTextColor) - cf.crTextColor = RGB(GetRValue(cf.crTextColor), GetGValue(cf.crTextColor), GetBValue(cf.crTextColor) == 0 ? GetBValue(cf.crTextColor) + 1 : GetBValue(cf.crTextColor) - 1); - - SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf); - break; - } - for (int i = 0; i < RTF_CTABLE_DEFSIZE; i++) - if (Utils::rtf_ctable[i].menuid == iSelection) { - cf.crTextColor = Utils::rtf_ctable[i].clr; - SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf); - } - } - break; - case IDCANCEL: ShowWindow(hwndContainer, SW_MINIMIZE); return FALSE; |