FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour SHGetFileInfo API translation
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
SHGetFileInfo API translation
Posted: Wed Apr 09, 2008 09: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
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
API-Function
Posted: Wed Apr 09, 2008 02:26 PM
Hello,
There is the FW-Function for the API

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 :-)
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.
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
SHGetFileInfo API translation
Posted: Thu Apr 10, 2008 02:06 AM

Thanks Uwe. I'll give it a try

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion