Resizing List Control Columns
-
Hello All! I am perplexed and am hoping that someone out there could help me figure this out. I have an application that uses a CListCtrl. When the application window is resized, I would like to dynamically resize each of the columns to fit the view. I have had a little success, however, as the application is resizing, the horizontal scroll bar flickers on and off as the columns are being resized :(( . This happens only when I have "show window contents while dragging" enabled in Windows, when this is turned off you don't notice the problem. What I am trying to do is similar to Outlook where the columns are resized as the window is resized. Please help, as I have exhausted all resources trying to find an answer to this, but have had no success. Warm Regards, Scott Evans
-
Hello All! I am perplexed and am hoping that someone out there could help me figure this out. I have an application that uses a CListCtrl. When the application window is resized, I would like to dynamically resize each of the columns to fit the view. I have had a little success, however, as the application is resizing, the horizontal scroll bar flickers on and off as the columns are being resized :(( . This happens only when I have "show window contents while dragging" enabled in Windows, when this is turned off you don't notice the problem. What I am trying to do is similar to Outlook where the columns are resized as the window is resized. Please help, as I have exhausted all resources trying to find an answer to this, but have had no success. Warm Regards, Scott Evans
Need more detailed info - post your OnSize handler or routine you're using to change the widths. Tomasz Sowinski -- http://www.shooltz.com
-
Hello All! I am perplexed and am hoping that someone out there could help me figure this out. I have an application that uses a CListCtrl. When the application window is resized, I would like to dynamically resize each of the columns to fit the view. I have had a little success, however, as the application is resizing, the horizontal scroll bar flickers on and off as the columns are being resized :(( . This happens only when I have "show window contents while dragging" enabled in Windows, when this is turned off you don't notice the problem. What I am trying to do is similar to Outlook where the columns are resized as the window is resized. Please help, as I have exhausted all resources trying to find an answer to this, but have had no success. Warm Regards, Scott Evans
Hi, It could be that you're resizing when the scrollbar has already been shown. Try to do it in OnSizing (WM_SIZING) or try to SetRedraw(FALSE) before, then SetRedraw(TRUE) after the resizing process. Hope this helps, Paolo. ------ "airplane is cool, but space shuttle is even better" (J. Kaczorowski)