Gary Kibble
April 29th, 1998, 10:09 AM
Correction to "Autosize a column to fit its content - Roger Onslow"
I modified the source to work from a CListView rather than a Ctrl. However we had an annoying flicker that I traced to SetColumnWidth(). SetRedraw(false) did not suffice (this is very apparent with a non-white background, you can see white gaps appear after each column as it is resized but before the background is refreshed).
I stopped the flicker by using ShowWindow( SW_HIDE / SW_SHOW ) at the start/end of the OnUpdate() function.
I modified the source to work from a CListView rather than a Ctrl. However we had an annoying flicker that I traced to SetColumnWidth(). SetRedraw(false) did not suffice (this is very apparent with a non-white background, you can see white gaps appear after each column as it is resized but before the background is refreshed).
I stopped the flicker by using ShowWindow( SW_HIDE / SW_SHOW ) at the start/end of the OnUpdate() function.