diff options
author | George Hazan <ghazan@miranda.im> | 2021-05-13 11:40:17 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2021-05-13 11:40:17 +0300 |
commit | 1aecfbf8295912ccfc26bdbd9d745aed96966e66 (patch) | |
tree | 0032ec38ed3a3efeb0b7bd2dfb9c3c70e3c75c83 /src/mir_core | |
parent | fcd8fed654606c80c4ec8a0f6718ba62de331e95 (diff) |
UI classes & core code cleaning:
- MS_CLIST_DELETECONTACT introduced to avoid the usage of string constants directly;
- start menu item id parameter added to Clist_GroupBuildMenu();
- CNF_MAX macro added to simplify cycles over CNF_* array;
- custom draw support for CCtrlListView & CCtrlTreeView;
- Miranda's specific WM_MEASUREITEM & WM_DRAWITEM processing in CDlgBase
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/CCtrlListView.cpp | 1 | ||||
-rw-r--r-- | src/mir_core/src/CCtrlTreeView.cpp | 1 | ||||
-rw-r--r-- | src/mir_core/src/CDlgBase.cpp | 4 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/mir_core/src/CCtrlListView.cpp b/src/mir_core/src/CCtrlListView.cpp index 9ef8687bc6..5ac8f4d32e 100644 --- a/src/mir_core/src/CCtrlListView.cpp +++ b/src/mir_core/src/CCtrlListView.cpp @@ -36,6 +36,7 @@ BOOL CCtrlListView::OnNotify(int, NMHDR *pnmh) switch (pnmh->code) { case NM_CLICK: OnClick(&evt); return TRUE; case NM_DBLCLK: OnDoubleClick(&evt); return TRUE; + case NM_CUSTOMDRAW: OnCustomDraw(&evt); return TRUE; case LVN_BEGINDRAG: OnBeginDrag(&evt); return TRUE; case LVN_BEGINLABELEDIT: OnBeginLabelEdit(&evt); return TRUE; case LVN_BEGINRDRAG: OnBeginRDrag(&evt); return TRUE; diff --git a/src/mir_core/src/CCtrlTreeView.cpp b/src/mir_core/src/CCtrlTreeView.cpp index 056f149588..0522bfee03 100644 --- a/src/mir_core/src/CCtrlTreeView.cpp +++ b/src/mir_core/src/CCtrlTreeView.cpp @@ -285,6 +285,7 @@ BOOL CCtrlTreeView::OnNotify(int, NMHDR *pnmh) switch (pnmh->code) { case NM_RCLICK: OnRightClick(&evt); return TRUE; + case NM_CUSTOMDRAW: OnCustomDraw(&evt); return TRUE; case TVN_BEGINLABELEDIT: OnBeginLabelEdit(&evt); return TRUE; case TVN_BEGINRDRAG: OnBeginRDrag(&evt); return TRUE; case TVN_DELETEITEM: OnDeleteItem(&evt); return TRUE; diff --git a/src/mir_core/src/CDlgBase.cpp b/src/mir_core/src/CDlgBase.cpp index de23eec3d9..bc051554de 100644 --- a/src/mir_core/src/CDlgBase.cpp +++ b/src/mir_core/src/CDlgBase.cpp @@ -245,7 +245,7 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) break; case WM_MEASUREITEM: - { + if (!Menu_MeasureItem(lParam)) { MEASUREITEMSTRUCT *param = (MEASUREITEMSTRUCT *)lParam; if (param && param->CtlID) if (CCtrlBase *ctrl = FindControl(param->CtlID)) @@ -254,7 +254,7 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) return FALSE; case WM_DRAWITEM: - { + if (!Menu_DrawItem(lParam)) { DRAWITEMSTRUCT *param = (DRAWITEMSTRUCT *)lParam; if (param && param->CtlID) if (CCtrlBase *ctrl = FindControl(param->CtlID)) |