summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-11-25 21:55:15 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-11-25 21:55:15 +0300
commit0e63937ce3ec5af17e5fe2acb4d0adb18782ee2a (patch)
tree0397e6557a7a822a16fc17c1ec2a5ac864d0da90 /src/mir_app
parent8b145cf934fa86b71223d25583db19880903ef84 (diff)
WM_CTLCOLORSTATIC handler moved to mir_core.dll
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/colorchooser.cpp11
-rw-r--r--src/mir_app/src/options.cpp11
-rw-r--r--src/mir_app/src/profilemanager.cpp14
-rw-r--r--src/mir_app/src/proto_opts.cpp15
4 files changed, 9 insertions, 42 deletions
diff --git a/src/mir_app/src/colorchooser.cpp b/src/mir_app/src/colorchooser.cpp
index f414bec570..2cde79322b 100644
--- a/src/mir_app/src/colorchooser.cpp
+++ b/src/mir_app/src/colorchooser.cpp
@@ -78,6 +78,8 @@ public:
RECT rc;
GetWindowRect(hwndChooser, &rc);
+ m_text.UseSystemColors();
+
m_hwndParent = hwndDlg;
m_hwndTarget = hwndTarget;
m_pModule = chatApi.MM_FindModule(si->pszModule);
@@ -115,15 +117,6 @@ public:
virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
switch (msg) {
- case WM_CTLCOLOREDIT:
- case WM_CTLCOLORSTATIC:
- if ((HWND)lParam == m_text.GetHwnd()) {
- SetTextColor((HDC)wParam, RGB(60, 60, 150));
- SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
- return (INT_PTR)GetSysColorBrush(COLOR_WINDOW);
- }
- break;
-
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp
index 1c0505ea21..fbafdd2b11 100644
--- a/src/mir_app/src/options.cpp
+++ b/src/mir_app/src/options.cpp
@@ -728,6 +728,8 @@ public:
m_szTab(pszTab),
m_pages(arPages)
{
+ m_keywordFilter.UseSystemColors();
+
m_pageTree.OnSelChanging = Callback(this, &COptionsDlg::OnChanging);
m_pageTree.OnSelChanged = Callback(this, &COptionsDlg::OnTreeChanged);
@@ -1040,15 +1042,6 @@ public:
virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
switch (msg) {
- case WM_CTLCOLORSTATIC:
- switch (GetDlgCtrlID((HWND)lParam)) {
- case IDC_WHITERECT:
- case IDC_KEYWORD_FILTER:
- SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
- return (INT_PTR)GetSysColorBrush(COLOR_WINDOW);
- }
- break;
-
case HM_MODULELOAD:
LoadOptionsModule((HINSTANCE)lParam);
break;
diff --git a/src/mir_app/src/profilemanager.cpp b/src/mir_app/src/profilemanager.cpp
index 0c24f1738c..9790a5cae3 100644
--- a/src/mir_app/src/profilemanager.cpp
+++ b/src/mir_app/src/profilemanager.cpp
@@ -620,20 +620,6 @@ public:
}
}
- virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam)
- {
- switch (msg) {
- case WM_CTLCOLORSTATIC:
- switch (GetDlgCtrlID((HWND)lParam)) {
- case IDC_WHITERECT:
- SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
- return (INT_PTR)GetSysColorBrush(COLOR_WINDOW);
- }
- break;
- }
- return CDlgBase::DlgProc(msg, wParam, lParam);
- }
-
virtual void OnDestroy()
{
LRESULT curSel = m_servicePlugs.GetCurSel();
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp
index 7464d0b6ff..4b49f22ed5 100644
--- a/src/mir_app/src/proto_opts.cpp
+++ b/src/mir_app/src/proto_opts.cpp
@@ -269,6 +269,7 @@ class CAccountManagerDlg : public CDlgBase
CAccountListCtrl m_accList;
CCtrlButton m_btnAdd, m_btnEdit, m_btnUpgrade, m_btnRemove, m_btnOptions, m_btnNetwork;
CCtrlButton m_btnOk, m_btnCancel;
+ CCtrlBase m_name;
void ClickButton(CCtrlButton &btn)
{
@@ -346,6 +347,7 @@ public:
CAccountManagerDlg() :
CDlgBase(g_hInst, IDD_ACCMGR),
m_accList(this, IDC_ACCLIST),
+ m_name(this, IDC_NAME),
m_btnOk(this, IDOK),
m_btnAdd(this, IDC_ADD),
m_btnEdit(this, IDC_EDIT),
@@ -355,6 +357,8 @@ public:
m_btnOptions(this, IDC_OPTIONS),
m_btnNetwork(this, IDC_LNK_NETWORK)
{
+ m_name.UseSystemColors();
+
m_accList.OnDblClick = Callback(this, &CAccountManagerDlg::OnListDblClick);
m_accList.OnSelChange = Callback(this, &CAccountManagerDlg::OnListSelChange);
m_accList.OnBuildMenu = Callback(this, &CAccountManagerDlg::OnListMenu);
@@ -408,7 +412,7 @@ public:
m_normalHeight = 4 + max(m_titleHeight, g_iIconSY);
m_selectedHeight = m_normalHeight + 4 + 2 * m_textHeight;
- SendDlgItemMessage(m_hwnd, IDC_NAME, WM_SETFONT, (WPARAM)m_hfntTitle, 0);
+ m_name.SendMsg(WM_SETFONT, (WPARAM)m_hfntTitle, 0);
SendDlgItemMessage(m_hwnd, IDC_TXT_ACCOUNT, WM_SETFONT, (WPARAM)m_hfntTitle, 0);
SendDlgItemMessage(m_hwnd, IDC_TXT_ADDITIONAL, WM_SETFONT, (WPARAM)m_hfntTitle, 0);
@@ -671,15 +675,6 @@ public:
virtual INT_PTR DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) override
{
switch (msg) {
- case WM_CTLCOLORSTATIC:
- switch (GetDlgCtrlID((HWND)lParam)) {
- case IDC_WHITERECT:
- case IDC_NAME:
- SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
- return (INT_PTR)GetSysColorBrush(COLOR_WINDOW);
- }
- break;
-
case WM_MY_REFRESH:
m_iSelected = -1;
{