Click to See Complete Forum and Search --> : Disappearing icon in list control


WishYou
October 7th, 2002, 03:20 AM
I am currently developing a file-explorer like application, with a TreeView on the left side, a ListView on the right side and a preview pane in the bottom.

Originally the app was developed with VS 6.0 but now I'm porting to and reworking in .Net

But I cant get the list view to work properly. I set imagelist icons for the items but when I select an item the icon disappear, no trace of it. It seems that the background is shining through when the icon is disappearing. When the item is unselected, the icon returns.

Does anyone know whats going on here? Is it a bug in MFC7.0? Do I need to specifically set the selected image, like in the tree control? Can't find any documentation of this in MSDN...

I'm lost...

Thanx...

WishYou

x-saxon
October 15th, 2003, 02:50 AM
I haven't problem with it. I am also do like you, i mean convert project from 6.0 to .net.
What about listing items. Do you have problem with showing items with all subitems, i mean does listview show text of all columns?

myron
February 17th, 2004, 12:42 AM
Oops, I'm encounting the same problem as well.
I'm using MFC 6.0.

Very strange, it works fine when I test it on a simple dialog.
However, when I use it on my main application with Property Sheet, the image(s) disappear when select the items.

No idea how to solve this problem.
Hope someone could help. :blush:

myron
February 17th, 2004, 01:28 AM
Alright, I post my question here (with image):
http://www.codeguru.com/forum/showthread.php?s=&postid=896781

and hope so guru could show up soon.
:)

bambos_xiouros
October 4th, 2007, 06:19 AM
3 years on and I'm having the same problem!

Did anyone find a solution?

bambos_xiouros
October 4th, 2007, 08:56 AM
AHA !

In CImageList::Create if you "| ILC_MASK" to the Bitmap Depth param (Param 3) then it seems to work.