From 3093a6a5fbe4d5410f7c2d96b05c4b8b2ce4518c Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sun, 4 Sep 2011 07:58:45 +0000 Subject: [PATCH] About Measures: Skins listbox now grows with window. --- Library/DialogAbout.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Library/DialogAbout.cpp b/Library/DialogAbout.cpp index edf3ddfa..d838c92d 100644 --- a/Library/DialogAbout.cpp +++ b/Library/DialogAbout.cpp @@ -605,15 +605,16 @@ void CDialogAbout::CTabMeasures::Resize(int w, int h) SetWindowPos(m_Window, NULL, 0, 0, w, h, SWP_NOMOVE | SWP_NOZORDER); HWND item = GetDlgItem(m_Window, IDC_ABOUTMEASURES_ITEMS_LISTBOX); - SetWindowPos(item, NULL, 0, 0, 180, h, SWP_NOMOVE | SWP_NOZORDER); + int wList = (w < 650) ? (w - 373) : 277; + SetWindowPos(item, NULL, 0, 0, wList, h, SWP_NOMOVE | SWP_NOZORDER); item = GetDlgItem(m_Window, IDC_ABOUTMEASURES_ITEMS_LISTVIEW); - SetWindowPos(item, NULL, 0, 0, w - 190, h, SWP_NOMOVE | SWP_NOZORDER); + SetWindowPos(item, NULL, (w < 650) ? (w - 365) : 285, 0, w - wList - 10, h, SWP_NOZORDER); // Adjust third column LVCOLUMN lvc; lvc.mask = LVCF_WIDTH; - lvc.cx = w - 422; + lvc.cx = w - wList - 243; ListView_SetColumn(item, 2, &lvc); }