[Debugger UI] Fix TLB window in HDPI configs

This commit is contained in:
oddMLan 2019-05-10 09:23:41 -07:00
parent 9c68405238
commit 06d0e27af6
1 changed files with 10 additions and 9 deletions

View File

@ -26,52 +26,53 @@ LRESULT CDebugTlb::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lPara
DlgSavePos_Init(DebuggerUI_TLBPos);
LV_COLUMN col;
float DPIScale = CClientDC(m_hWnd).GetDeviceCaps(LOGPIXELSX) / 96.0f;
col.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
col.fmt = LVCFMT_LEFT;
col.pszText = "Index";
col.cx = 40;
col.cx = 40 * DPIScale;
col.iSubItem = 0;
ListView_InsertColumn(GetDlgItem(IDC_LIST), 0, &col);
col.pszText = "Page Mask";
col.cx = 90;
col.cx = 90 * DPIScale;
col.iSubItem = 1;
ListView_InsertColumn(GetDlgItem(IDC_LIST), 1, &col);
col.pszText = "Entry Hi";
col.cx = 90;
col.cx = 90 * DPIScale;
col.iSubItem = 2;
ListView_InsertColumn(GetDlgItem(IDC_LIST), 2, &col);
col.pszText = "Entry Lo0";
col.cx = 90;
col.cx = 90 * DPIScale;
col.iSubItem = 3;
ListView_InsertColumn(GetDlgItem(IDC_LIST), 3, &col);
col.pszText = "Entry Lo1";
col.cx = 90;
col.cx = 90 * DPIScale;
col.iSubItem = 4;
ListView_InsertColumn(GetDlgItem(IDC_LIST), 4, &col);
col.pszText = "Index";
col.cx = 40;
col.cx = 40 * DPIScale;
col.iSubItem = 0;
ListView_InsertColumn(GetDlgItem(IDC_LIST2), 0, &col);
col.pszText = "Valid";
col.cx = 40;
col.cx = 40 * DPIScale;
col.iSubItem = 1;
ListView_InsertColumn(GetDlgItem(IDC_LIST2), 1, &col);
col.pszText = "Dirty";
col.cx = 40;
col.cx = 40 * DPIScale;
col.iSubItem = 2;
ListView_InsertColumn(GetDlgItem(IDC_LIST2), 2, &col);
col.pszText = "Rule";
col.cx = 270;
col.cx = 270 * DPIScale;
col.iSubItem = 3;
ListView_InsertColumn(GetDlgItem(IDC_LIST2), 3, &col);