diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-20 21:27:30 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-20 21:27:30 +0200 |
commit | 561ee240477e348efcd3670a5481ccb538d6724b (patch) | |
tree | 0bfee883963a390c657e627a2184068826168d6f /c/datalistview.cpp | |
parent | 3f842c733568aa9068aa83fad52540eb98f334b1 (diff) | |
download | EpisodeBrowser-561ee240477e348efcd3670a5481ccb538d6724b.tar.gz |
Simplify UpdateLayout.
Diffstat (limited to 'c/datalistview.cpp')
-rw-r--r-- | c/datalistview.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/c/datalistview.cpp b/c/datalistview.cpp index eace820..c191901 100644 --- a/c/datalistview.cpp +++ b/c/datalistview.cpp @@ -29,6 +29,16 @@ DataListView::DataListView(const HWND hWndParent) ListView_InsertColumn(hWnd, DLVSIVALUE, &lvc); } +void DataListView::ResizeColumns(RECT& rcParent) +{ + extern int g_cxVScroll; + 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-g_cxVScroll-4); +} + void DataListView::ShowEpisode(const int iEpisode) { extern EpisodeListView* const g_pElv; |