Icons bkg color in ReportCtrl |
Post Reply |
Author | |
securigy
Groupie Joined: 23 November 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
Posted: 31 March 2009 at 1:49pm |
I have the following code when setting up my report control:
// bkg color of the sorted column
pListCtrl->SetSortBackColor(RGB(235,235,235));
// create image list and associate it with the listctrl
CBitmap bitmap;
bitmap.LoadBitmap(IDB_TREE_ICONS);
m_ImageList.Create(16, 16, ILC_COLOR24|ILC_MASK, 6, 1); m_ImageList.Add(&bitmap, RGB(255,0,255)); m_BtListCtrl.SetImageList(&m_ImageList, LVSIL_SMALL); the result looks like that:
that is, the bkg color of the icon displayed white instead of grey of RGB(235,235,235)
the bkg color in the resource bitmap is RGB(255,0,255)
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
What is this question about? CListCtrl? or ReportControl? Report Control have no function SetImageList(&m_ImageList, LVSIL_SMALL);
It has function for GetImageManager
//SetImageList(UINT nBitmap, int cx, int nBaseCommand, COLORREF clrMask)
e.g. wndReport.GetImageManager()->SetImageList(IDB_ICONVIEWTEST, 32, 0, RGB(255, 0, 255)); |
|
securigy
Groupie Joined: 23 November 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
|
sorry. it is my list control class derived from CXTListCtrl class.
|
|
securigy
Groupie Joined: 23 November 2007 Status: Offline Points: 41 |
Post Options
Thanks(0)
|
Rephrasing the question. I have the following code that sets the background of the sorted column in my listctrl that is derived from CXTListCtrl:
pListCtrl->EnableUserSortColor(TRUE); m_nSortedCol = 0; m_bAscending = TRUE; pListCtrl->SetSortBackColor(RGB(235,235,235)); // light grey color SortColumn(m_nSortedCol, m_bAscending); pListCtrl->RedrawWindow(); Then I have the code that adds image list for the listctrl icons: // create image list and associate it with the listctrlCBitmap bitmap; bitmap.LoadBitmap(IDB_LIST_ICONS); m_ImageList.Create(16, 16, ILC_COLOR24|ILC_MASK, 6, 1); m_ImageList.Add(&bitmap, RGB(235,0,235)); // the bitmap resource has grey background m_BtListCtrl.SetImageList(&m_ImageList, LVSIL_SMALL); The bottom line is that the icons do not show correctly: there are some 2 white vertical pixels and 1 horizontal... Is it a bug in CXTListCtrl ? or am I doing something wrong here?
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Check CodeProject - CodeGuru site - they have enough info about CListCtrl and derivations |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |