aboutsummaryrefslogtreecommitdiff
path: root/c/datalistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c/datalistview.cpp')
-rw-r--r--c/datalistview.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/c/datalistview.cpp b/c/datalistview.cpp
index 9ff4659..b728fa8 100644
--- a/c/datalistview.cpp
+++ b/c/datalistview.cpp
@@ -29,13 +29,15 @@ DataListView::DataListView(const HWND hWndParent)
ListView_InsertColumn(hWnd, DLVSIVALUE, &lvc);
}
-void DataListView::ResizeColumns(RECT& rcParent)
+void DataListView::ResizeColumns()
{
- ListView_SetColumnWidth(hWnd, DLVSIKEY, LVSCW_AUTOSIZE);
+ RECT rc;
+ require(GetClientRect(hWnd, &rc));
+ ListView_SetColumnWidth(hWnd, DLVSIKEY, LVSCW_AUTOSIZE);
const int cxColumn = ListView_GetColumnWidth(hWnd, 0)+4;
ListView_SetColumnWidth(hWnd, DLVSIKEY, cxColumn);
- ListView_SetColumnWidth(hWnd, DLVSIVALUE, rcParent.right-cxColumn-Metric<SM_CXVSCROLL>-4);
+ ListView_SetColumnWidth(hWnd, DLVSIVALUE, rc.right-cxColumn);
}
void DataListView::ShowEpisode(const int iEpisode)