Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assistance translating a WinAPI example...
Message
De
19/10/1999 23:54:04
 
 
À
10/10/1999 09:52:25
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00274731
Message ID:
00278628
Vues:
19
>I want to use this API function. I'd appreciate any help translating it to VFP. TIA.
>
>
HICON ExtractAssociatedIcon(
>  HINSTANCE hInst,    // application instance handle
>  LPTSTR lpIconPath,  // name of file
>  LPWORD lpiIcon      // pointer to icon index
>);

DECLARE INTEGER ExtractAssociatedIcon IN SHELL32 ;
   INTEGER hInst, ;
   STRING @ lpIconpath, ;
   SHORT @ lpiIcon

SHORT is not officially supported.  You can use INTEGER @ instead, and use positive values of 0 - 32K or a -1 for the third argument.  Under VFP6, DECLARE...DLL accepts the SHORT declaration in spite of it not being documented as accepting such.

The return from the function is an Icon Handle, used by other Icon-related API calls.  The string passed as the second argument is the full path of the icon source.  The third parameter indicates which icon to return, a value 0-32K is the icon index, a -1 returns the number of embedded icons from the function for the IconPath file, for use in referencing in a second call.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform