如何防止用户调整clistctrl(报告视图)的列宽大小? [英] How do you prevent a user from resizing the column width of a clistctrl (report view)?
问题描述
如何防止用户调整clistctrl(报告视图)的列宽大小?
您必须重写OnNotify
方法以捕获标头的TRACK消息.
这是一个解决方案:防止列大小调整 >
更新:在较新的MFC版本和Vista上,有LVCFMT_FIXED_WIDTH
格式标志.
您可以在插入列时设置该标志:请参见 LVCOLUMN结构
LVCFMT_FIXED_WIDTH
6.00版和Windows Vista.无法调整列的大小;与HDF_FIXEDWIDTH
相同.
How do you prevent a user from resizing the column width of a clistctrl (report view)?
You'll have to override theOnNotify
method to catch header's TRACK messages.
Here is a solution: Prevent column resizing
Update: on newer MFC versions and on Vista, there is the LVCFMT_FIXED_WIDTH
format flag.
You can set that flag when you insert the column: see LVCOLUMN Structure
LVCFMT_FIXED_WIDTH
Version 6.00 and Windows Vista. Can't resize the column; same asHDF_FIXEDWIDTH
.
这篇关于如何防止用户调整clistctrl(报告视图)的列宽大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!