Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

for bin_huwairib

Posted on 1998-06-07
6
184 Views
Last Modified: 2010-05-03
Some time ago you recommended a means of extracting a file's icon with SHGetFileInfo.  Can you recommend a means of extracting an file's icon simply based on it's file extension.  Since I am creating an FTP client program and using a treeview and listview control, I would like to represent the remote files with their corresponding images and cannot use SHGetFileInfo for this task.  Any advice would be appreciated.  Thanks, John
0
Comment
Question by:hozempa
  • 2
  • 2
  • 2
6 Comments
 
LVL 4

Expert Comment

by:zsi
ID: 1462741
You can maintain an image list that has icons for the files that you want to support.  However, there are a lot of file extension combinations out there.  Also, you will not be able to show the individual icons for executable programs, normally the program's icon.
0
 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1462742
hozempa,

I'm sorry because of my late response.

zsi is correct, it is better to create an image list for the supported extensions and it is usually a binary file icon and a text file icon. And regarding SHGetFileInfo it won't work because it's require the file to be exist in the client machine to be able to extract the icon. And in your case you just have the name of the file so you need to download the whole file first in order to use this function which is not practical.

Anyway if you need any further information, check the article Q175179 at http://support.microsoft.com 


Best regards
Bin Huwairib
0
 
LVL 1

Author Comment

by:hozempa
ID: 1462743
Bin Huwairib, thanks for the information.  I didn't think there was a way to do it aside from transferring the files onto the local system.   Still, I appreciate the response.  If you would still like the points, please send any answer to this question.
Thanks, hozempa
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1462744
hozempa,

I will be glad if you give the points to szi because he had respond before me, beside my comment was not so far from his that's why he deserve it.

zsi, please lock the question to get the points.


Best regards
Bin Huwairib
0
 
LVL 1

Author Comment

by:hozempa
ID: 1462745
That's fine with me, if it's agreeable with you.  Zsi, please post any response and I'll award you the points.
0
 
LVL 4

Accepted Solution

by:
zsi earned 50 total points
ID: 1462746
Of course, this question *was* directed to Bin.  I was just adding a comment.  Didn't mean to snag the points from ya, Bin. :)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question