I want to change CListCtrl Column resize by end user, if end user changed once, they wants the same size upto the application close, even if they refresh. please send full details and full source code for this.
It doesn't work properly also when the font of list items differ. For example if part of items are in BOLD font and the other part aren't, calling SetColumnWidth( ..., LVSCW_AUTOSIZE ) will resize the column width according to a smallest font string.
Does anybody have an idea how to make code to distinguish the different fonts?
AFAIK it is not necessary to find maximum width of differently autosized columns, because AUTOSIZE_USEHEADER does the same thing - it counts header width when calculating maximum width. I.e. this maximum will always be the width received as a result of AUTOSIZE_USEHEADER.
Summary: I suggest to remove calculations of maximum, and resizing with AUTOSIZE flag.