修改Listctrl的显示Style

//if the current style is not report, the following three lines is not need
GetListCtrl().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 icon
lStyle|=LVS_ICON;
//Ok,set new type style
SetWindowLong(GetListCtrl().GetSafeHwnd(),GWL_STYLE,lStyle);

posted on 2005-09-20 08:35  如果蜗牛有爱情  阅读(124)  评论(0编辑  收藏  举报

导航