shvetsov
asked on
Icons in TreeView
My TreView shows icons with black background.
I made background transparent, it looks transparent in Windows Explorer and I want it to be transparent in my TreeView. This is the code:
g_himl = ImageList_Create(16, 16, ILC_COLOR4, 1, 1);
hicon = LoadIcon(g_hInst, MAKEINTRESOURCE(ICO_MyComp ));
iMyComp = ImageList_AddIcon(g_himl, hicon);
DeleteObject(hicon);
TreeView_SetImageList(g_hw ndTree, g_himl, VSIL_NORMAL);
I made background transparent, it looks transparent in Windows Explorer and I want it to be transparent in my TreeView. This is the code:
g_himl = ImageList_Create(16, 16, ILC_COLOR4, 1, 1);
hicon = LoadIcon(g_hInst, MAKEINTRESOURCE(ICO_MyComp
iMyComp = ImageList_AddIcon(g_himl, hicon);
DeleteObject(hicon);
TreeView_SetImageList(g_hw
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If 256 color icon is used, u have to specify ILC_COLOR8
if 16 color icon - ILC_COLOR4 can use
One mistake is also in the code - that compliling error
"TreeView_SetImageList(g_h
correct is
TreeView_SetImageList(g_hw
GOOD LUCK