Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Programming Talk / C++ / C# - Win32 API. Setting the expanded image for a treeview control has no effect.

Author
Message
coolgames
19
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 18th Aug 2009 07:55
I've created a treeview control within my windows application using the basic Win32 API. I'm attempting to add an item to the tree that functions as a group folder.

The image list for the treeview contains 3 images: closed folder, open folder, item image.

The basic items within the treeview use the 3rd image.

The group treeview items are supposed to use the first two images. I want them to display the first image when not expanded, and I want them to display the second image when they are expanded.

Here is the code I use to add the group items to the treeview:


I'm pretty sure that this is right. In the application, the group treeview item will display the closed folder image when it is not selected, and it will show the open folder image when it is selected, but it doesn't show the open folder image when it is expanded and not selected. It should display the open folder image when it is expanded, but is doesn't. Does anyone know why this is?

Thanks,
Coolgames

Login to post a reply

Server time is: 2025-05-06 04:09:30
Your offset time is: 2025-05-06 04:09:30