Win32 ListCtrl columns issue

drjackool 956 Reputation points
2023-07-03T17:32:19.7566667+00:00

Hi

Platform: Win32/C++

When I adding a columns to a list view control at runtime I need to resize the list ctrl window to force it show the added column because the horizontal scrollbar of listctrl is NOT recalculated by itself.

How fix this issue?

Thanks

Windows development | Windows API - Win32
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 90,686 Reputation points
    2023-07-03T18:29:49.7233333+00:00

    If I resize the new added column, with for example :

    ListView_SetColumnWidth(hWndListView, nNewColumn, LVSCW_AUTOSIZE);
    

    the horizontal scrollbar is redrawn correctly

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.