beardenc
asked on
CListCtrl Fixed headers and Column Widths
I have a dialog based application which contains two list controls setup in report view that are used to monitor status events. I would like to fix the column widths and their headers so that they can not be changed or clicked.
I have set the controls up through the ClassWizard with an associated variable of CListCtrl type. I access the entries of the controls through the LV_ITEM structure and the columns through the LV_COLUMN structure.
I'm using version 5 of MSVC/C++ on NT 4/SP3.
I have set the controls up through the ClassWizard with an associated variable of CListCtrl type. I access the entries of the controls through the LV_ITEM structure and the columns through the LV_COLUMN structure.
I'm using version 5 of MSVC/C++ on NT 4/SP3.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
I forgot to say!!!
U have the variable for list control. declare it as of Ur class's object instead of CListCtrl. That means subclass that control to Ur class(say CDontResize).
Try it out.
I forgot to say!!!
U have the variable for list control. declare it as of Ur class's object instead of CListCtrl. That means subclass that control to Ur class(say CDontResize).
Try it out.
http://www.codeguru.com/listview/header_ctrl.shtml
http://www.codeguru.com/listview/no_col_resize.shtml
http://www.codeguru.com/listview/no_col_resize2.shtml
Also, http://www.codeguru.com/listview/index.shtml has some other links under the 'Columns' and 'Headers' sections.