SHGetFileInfo API translation

SHGetFileInfo API translation

Postby hua » Wed Apr 09, 2008 9:00 am

I want to display a list of filenames along with their icons and I found out SHGetFileInfo can be used to obtain them. Could someone help me translate the VB code that can be found here and here?

Hopefully inch by inch I can get closer to what my boss wants, something that's similar to Views icon in Windows Explorer.

TIA
Last edited by hua on Thu Apr 10, 2008 4:21 am, edited 2 times in total.
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

API-Function

Postby ukoenig » Wed Apr 09, 2008 2:26 pm

Hello,
There is the FW-Function for the API

Code: Select all  Expand view

DLL32 FUNCTION SHGetFilIn;
     ( pszPath AS STRING, ;
     dwFileAttributes AS LONG, ;
     @psfi AS LPSTR, ;                    // SHFILEINFO
     cbFileInfo AS LONG, ;
     uFlags AS LONG ) ;
     AS LONG PASCAL;
     FROM "SHGetFileInfoA" LIB "SHELL32"


STRUC oSHFILEINF
   MEMBER hIcon AS LONG
   MEMBER iIcon AS LONG
   MEMBER dwAttributes AS LONG
   MEMBER szDisplayName AS STRING
   MEMBER szTypeName AS STRING
END STRUC




Regards

Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby hua » Thu Apr 10, 2008 2:06 am

Thanks Uwe. I'll give it a try
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 90 guests