summaryrefslogtreecommitdiff
path: root/plugins/Clist_blind/src/clcopts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_blind/src/clcopts.cpp')
-rw-r--r--plugins/Clist_blind/src/clcopts.cpp29
1 files changed, 11 insertions, 18 deletions
diff --git a/plugins/Clist_blind/src/clcopts.cpp b/plugins/Clist_blind/src/clcopts.cpp
index 20d98c0557..8abc59289a 100644
--- a/plugins/Clist_blind/src/clcopts.cpp
+++ b/plugins/Clist_blind/src/clcopts.cpp
@@ -37,19 +37,15 @@ struct CheckBoxToStyleEx_t
int not;
}
-static const checkBoxToStyleEx[] = {
-// {IDC_DISABLEDRAGDROP, CLS_EX_DISABLEDRAGDROP, 0},
-// {IDC_NOTEDITLABELS, CLS_EX_EDITLABELS, 1},
-// {IDC_SHOWSELALWAYS, CLS_EX_SHOWSELALWAYS, 0},
- {IDC_TRACKSELECT, CLS_EX_TRACKSELECT, 0},
- {IDC_SHOWGROUPCOUNTS, CLS_EX_SHOWGROUPCOUNTS, 0},
- {IDC_HIDECOUNTSWHENEMPTY, CLS_EX_HIDECOUNTSWHENEMPTY, 0},
-// {IDC_DIVIDERONOFF, CLS_EX_DIVIDERONOFF, 0},
-// {IDC_NOTNOTRANSLUCENTSEL, CLS_EX_NOTRANSLUCENTSEL, 1},
- {IDC_LINEWITHGROUPS, CLS_EX_LINEWITHGROUPS, 0},
- {IDC_QUICKSEARCHVISONLY, CLS_EX_QUICKSEARCHVISONLY, 0},
- {IDC_SORTGROUPSALPHA, CLS_EX_SORTGROUPSALPHA, 0},
- {IDC_NOTNOSMOOTHSCROLLING, CLS_EX_NOSMOOTHSCROLLING, 1}
+static const checkBoxToStyleEx[] =
+{
+ { IDC_TRACKSELECT, CLS_EX_TRACKSELECT, 0 },
+ { IDC_SHOWGROUPCOUNTS, CLS_EX_SHOWGROUPCOUNTS, 0 },
+ { IDC_HIDECOUNTSWHENEMPTY, CLS_EX_HIDECOUNTSWHENEMPTY, 0 },
+ { IDC_LINEWITHGROUPS, CLS_EX_LINEWITHGROUPS, 0 },
+ { IDC_QUICKSEARCHVISONLY, CLS_EX_QUICKSEARCHVISONLY, 0 },
+ { IDC_SORTGROUPSALPHA, CLS_EX_SORTGROUPSALPHA, 0 },
+ { IDC_NOTNOSMOOTHSCROLLING, CLS_EX_NOSMOOTHSCROLLING, 1 }
};
struct CheckBoxValues_t
@@ -128,12 +124,9 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE,
GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_HIDEOFFLINEOPTS), GWL_STYLE) | TVS_NOHSCROLL | TVS_CHECKBOXES);
{
- int i;
DWORD exStyle = db_get_dw(NULL, "CLC", "ExStyle", Clist_GetDefaultExStyle());
- for (i = 0; i < _countof(checkBoxToStyleEx); i++)
- CheckDlgButton(hwndDlg, checkBoxToStyleEx[i].id,
- (exStyle & checkBoxToStyleEx[i].flag) ^ (checkBoxToStyleEx[i].flag *
- checkBoxToStyleEx[i].not) ? BST_CHECKED : BST_UNCHECKED);
+ for (auto &it : checkBoxToStyleEx)
+ CheckDlgButton(hwndDlg, it.id, (exStyle & it.flag) ^ (it.flag * it.not) ? BST_CHECKED : BST_UNCHECKED);
}
{
UDACCEL accel[2] = { {0, 10} , {2, 50} };