I have a class that is derived from a CListCtrl. I want the widths of all the columns to total the width of the display Window, so that I don't get the bottom scrollbar. I can get the width of standard scrollbars vai the GetSystemMetrics(SM_CXVSCROLL)
call, but I don't know how to tell if the vertical scrollbar is active. I've tried to use:
auto pScrollbar = GetScrollBarCtrl(SB_VERT);
auto is_visible = pScrollbar && pScrollbar->IsWindowVisible();
But pScrollbar
is always a nullptr
. I've looked around and some ppl are saying that the scrollbars are not always windows and may be draw in by hand (ugh!) and may not be a Window at all. This will make my life more difficult. Ideas?