This is a migrated thread and some comments may be shown as answers.

Using icons from ShGetFileInfo

4 Answers 99 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Martin Reich
Top achievements
Rank 1
Martin Reich asked on 22 Mar 2010, 05:31 AM
I am trying to use the icon images that are retrieved from the ShGetFileInfo API call.  In this way, for my file explorer I can use all of the windows default images without having to extract them and then place them into separate files.  I would appreciate it if anyone could let me know if this is possible?  Also, is it possible to use an ImageList collection with the TreeView?

Thanks.

Martin Reich

Update:

I have created a set of classes that will place the Shell32.dll icons (or from any other file the user wishes) into an images directory below the executable.  I then point DefaultImageSrc to the file in the images directory.  This works fine except for the 'light yellow' color in the icons.  When the icon is saved to a file, the 'light yellow' is being transformed into white.  If someone can help with his issue, I will post the code for others to use.

Update 2:

I have gotten the correct colors working.  Using an ImageList, I put the icon into the ImageList and then save the icon from the ImageList instance.  This process handles all of the color issues.  If someone would like this code just let me know and I will send it on.

4 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 24 Mar 2010, 10:08 AM
Hello Martin Reich,

Thank you for posting this example - it's definitely useful showcase.

All the best,
Miro Miroslavov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
OverCoded
Top achievements
Rank 2
answered on 14 Jun 2010, 09:03 PM
I am confused by this post. I have not been able to find an ImageList anywhere in WPF controls or the WPF Radcontrols. I am trying to get icons and checkboxes in my treeview if an imagelist would do it I would like to know how to implement it. thanks
0
Miro Miroslavov
Telerik team
answered on 17 Jun 2010, 01:42 PM
Hi Mark Coe,

There is no ImageList component in our suit. This was post from our customer regarding some special icons. If you want to have check boxes or images in your RadTreeView, you could refer to this help article.
If you have further questions regarding RadTreeView, please contact us. (It will be better in new support ticket.).
Thank you.

Sincerely yours,
Miro Miroslavov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
fred williams
Top achievements
Rank 1
answered on 10 Apr 2011, 01:49 AM
Hello Martin,

I'd like to see this code if possible. i'm trying to implement the same thing in an application. Thanks.
Tags
TreeView
Asked by
Martin Reich
Top achievements
Rank 1
Answers by
Miro Miroslavov
Telerik team
OverCoded
Top achievements
Rank 2
fred williams
Top achievements
Rank 1
Share this question
or