GT
2010-03-23 11:47:59 UTC
I have a few views based on CTreeCtrl and CListCtrl. The list is set to
details view, so never uses large icons. I define an image list for them and
add the icons as follows:
int nColorDepth = CWindowDC(this).GetDeviceCaps(BITSPIXEL);
m_ImageList.Create(16, 16, nColorDepth > 16 ? ILC_COLOR32 :
ILC_COLOR24|ILC_MASK, 1, 1);
m_ImageList.Add(app->LoadIcon(IDI_FolderBlue));
etc etc for each icon.
I then use SetImageList to apply the icons to the list or tree.
My question is about the icons size on both the trees and lists. I want to
use the same icon on the tree and list, but:
Do they always have to be square?
Do they always have to be 16x16?
Can I make an icon that is the standard height, but wider - 32x16 for
example - maybe wider?
Thanks,
GT
details view, so never uses large icons. I define an image list for them and
add the icons as follows:
int nColorDepth = CWindowDC(this).GetDeviceCaps(BITSPIXEL);
m_ImageList.Create(16, 16, nColorDepth > 16 ? ILC_COLOR32 :
ILC_COLOR24|ILC_MASK, 1, 1);
m_ImageList.Add(app->LoadIcon(IDI_FolderBlue));
etc etc for each icon.
I then use SetImageList to apply the icons to the list or tree.
My question is about the icons size on both the trees and lists. I want to
use the same icon on the tree and list, but:
Do they always have to be square?
Do they always have to be 16x16?
Can I make an icon that is the standard height, but wider - 32x16 for
example - maybe wider?
Thanks,
GT