Group: Icon - Library: shell32
The ExtractAssociatedIcon function returns a handle to an indexed icon found in a file or an icon found in an associated executable file.
Retrieving information about the specified icon
Displaying icons in the system tray (VFP9)
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
GDI+: custom Clock Control
HICON ExtractAssociatedIcon(
HINSTANCE hInst, // application instance handle
LPTSTR lpIconPath, // file name
LPWORD lpiIcon // icon index
);
DECLARE INTEGER ExtractAssociatedIcon IN shell32;
INTEGER hInst,;
STRING lpIconPath,;
INTEGER @ lpiIcon
hInst [in] Specifies the instance of the application calling the function.
lpIconPath [in] Pointer to a string that specifies the full path and file name of the file that contains the icon.
lpiIcon [in] Pointer to a WORD that specifies the index of the icon whose handle is to be obtained.
If the function succeeds, the return value is an icon handle. If the function fails, the return value is NULL.
See also: ExtractIcon.