Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Assistance translating a WinAPI example...
Message
De
10/10/1999 14:03:05
 
 
À
10/10/1999 10:08:57
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:
00274771
Vues:
31
Well I can give you the syntax, but I'm not sure where to get the instance handle, or what your going to do with the icon handle. Note: According to the VFP help, SHELL32.DLL is not considered part of WIN32API.

DECLARE LONG ExtractAssociatedIcon IN SHELL32.DLL ;
LONG lnInstance, STRING lcFileName, INTEGER @ lnIconIndex
LOCAL lnIconHandle, lnInstance, lcFileName, lnIconIndex

lnInstance = 0 && ?
lnIconIndex = 0
lcFileName = "c:\winnt\explorer.exe"

lnIconHandle = ExtractAssociatedIcon(lnInstance, lcFileName, @lnIconIndex)

? lnIconHandle
? lnIconIndex

Rick


>I added the parameters from the help file.
>>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
>Parameters
>hInst
>Specifies the instance of the application calling the function.
>lpIconPath
>Pointer to a string that specifies the full path and file name of the file that contains the icon. The function extracts the icon handle from that file, or from an executable file associated with that file.
>If the icon handle is obtained from an executable file, the function stores the full path and file name of that executable in the string pointed to by lpIconPath.
>
>lpiIcon
>Pointer to a WORD that specifies the index of the icon whose handle is to be obtained.
>If the icon handle is obtained from an executable file, the function stores the icon's identifier in the WORD pointed to by lpiIcon.
>
>>);
>
>This is what I have so far (am guessing based on examples here on the UT):
>
>
DECLARE ExtractAssociatedIcon IN WIN32API
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform