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)); //设置文字颜色
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)); //设置文字颜色