*/
void CDirColsDlg::InitList()
{
+ const int lpx = CClientDC(this).GetDeviceCaps(LOGPIXELSX);
+ auto pointToPixel = [lpx](int point) { return MulDiv(point, lpx, 72); };
+
// Show selection across entire row.
// Also enable infotips.
m_listColumns.SetExtendedStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP);
- m_listColumns.InsertColumn(0, _T(""), LVCFMT_LEFT, 150);
+ m_listColumns.InsertColumn(0, _T(""), LVCFMT_LEFT, pointToPixel(112));
}
/**
// Also enable infotips.
m_listFilters.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP);
+ const int lpx = CClientDC(this).GetDeviceCaps(LOGPIXELSX);
+ auto pointToPixel = [lpx](int point) { return MulDiv(point, lpx, 72); };
+
String title = _("Name");
- m_listFilters.InsertColumn(0, title.c_str(), LVCFMT_LEFT, 150);
+ m_listFilters.InsertColumn(0, title.c_str(), LVCFMT_LEFT, pointToPixel(112));
title = _("Description");
- m_listFilters.InsertColumn(1, title.c_str(), LVCFMT_LEFT, 350);
+ m_listFilters.InsertColumn(1, title.c_str(), LVCFMT_LEFT, pointToPixel(262));
title = _("Location");
- m_listFilters.InsertColumn(2, title.c_str(), LVCFMT_LEFT, 350);
+ m_listFilters.InsertColumn(2, title.c_str(), LVCFMT_LEFT, pointToPixel(262));
title = _("<None>");
m_listFilters.InsertItem(1, title.c_str());
// Also enable infotips.
m_filtersList.SetExtendedStyle(LVS_EX_CHECKBOXES | LVS_EX_GRIDLINES | LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP);
+ const int lpx = CClientDC(this).GetDeviceCaps(LOGPIXELSX);
+ auto pointToPixel = [lpx](int point) { return MulDiv(point, lpx, 72); };
+
String title = _("Regular expression");
- m_filtersList.InsertColumn(1, title.c_str(), LVCFMT_LEFT, 500);
+ m_filtersList.InsertColumn(1, title.c_str(), LVCFMT_LEFT, pointToPixel(375));
size_t count = m_pList->GetCount();
for (size_t i = 0; i < count; i++)
// Also enable infotips.
m_list.SetExtendedStyle(LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP);
+ const int lpx = CClientDC(this).GetDeviceCaps(LOGPIXELSX);
+ auto pointToPixel = [lpx](int point) { return MulDiv(point, lpx, 72); };
+
String title = _("Name");
- m_list.InsertColumn(0, title.c_str(), LVCFMT_LEFT, 200);
+ m_list.InsertColumn(0, title.c_str(), LVCFMT_LEFT, pointToPixel(150));
title = _("Type");
- m_list.InsertColumn(1, title.c_str(), LVCFMT_LEFT, 100);
+ m_list.InsertColumn(1, title.c_str(), LVCFMT_LEFT, pointToPixel(75));
title = _("Description");
- m_list.InsertColumn(2, title.c_str(), LVCFMT_LEFT, 300);
+ m_list.InsertColumn(2, title.c_str(), LVCFMT_LEFT, pointToPixel(225));
}
/**