您的位置:首页 > 其它

listctrl添加背景色,图标去掉阴影

2015-02-09 20:26 274 查看
CBitmap bm;

bm.LoadBitmap(IDB_BITMAP_7STATE);//IDB_BITMAP_7STATE为bmp资源

m_rtuImageList[iPortID - 1].Create(48,48,ILC_COLOR32|ILC_MASK,0,0);//m_rtuImageList为imagelist控件对象

m_rtuImageList[iPortID - 1].Add(&bm, (COLORREF)0xFFFFFF);//屏蔽阴影

m_wndListMonitorPortRTUs[iPortID - 1].SetImageList( &m_rtuImageList[iPortID - 1] , LVSIL_NORMAL );//m_wndListMonitorPortRTUs为listctrl控件对象

m_wndListMonitorPortRTUs[iPortID - 1].SetBkColor(RGB(126,206,695));//设置背景色

m_wndListMonitorPortRTUs[iPortID - 1].SetTextBkColor(RGB(126,206,183)); //设置文字颜色
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: