您的位置:首页 > 其它

修改Listctrl的显示Style

2005-09-20 08:35 253 查看
//if the current style is not report, the following three lines is not needGetListCtrl().DeleteAllItems();
for(int h=GetListCtrl().GetHeaderCtrl()->GetItemCount();h>0;h--)
GetListCtrl().DeleteColumn(h-1);
LONG lStyle;//Get current window style
lStyle=GetWindowLong(GetListCtrl().GetSafeHwnd(),GWL_STYLE);//Clear original type mask lStyle &= ~LVS_TYPEMASK;
//Add new type style,the sample is iconlStyle|=LVS_ICON; //Ok,set new type style
SetWindowLong(GetListCtrl().GetSafeHwnd(),GWL_STYLE,lStyle);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: