Using Win32 functions in Visual FoxPro Image Gallery
Icon
..msdn
CopyIcon
DestroyIcon
DrawIcon
ExtractAssociatedIcon
ExtractIcon
GetIconInfo
LoadIcon
Code examples:
GDI+: Storing DLL icon resources in image files
How to view icons stored in executable files (Icon Viewer)
How to view icons stored in executable files (Icon Viewer) - II
ExtractIcon
..msdn    Add comment     W32 Constants      Translate this page
Retrieves a handle to an icon from the specified executable file, dynamic-link library (DLL), or icon file.
Code examples:
How to view icons stored in executable files (Icon Viewer) - II
How to view icons stored in executable files (Icon Viewer)
GDI+: Storing DLL icon resources in image files
Declaration:
HICON ExtractIcon(
  HINSTANCE hInst,          // instance handle
  LPCTSTR lpszExeFileName,  // file name
  UINT nIconIndex           // icon index
);
FoxPro declaration:
DECLARE INTEGER ExtractIcon IN shell32;
    INTEGER hInst,;
    STRING  lpszExeFileName,;
    INTEGER lpiIcon
Parameters:
hInst
[in] Handle to the instance of the application calling the function.

lpszExeFileName
[in] Pointer to a null-terminated string specifying the name of an executable file, DLL, or icon file.

nIconIndex
[in] Specifies the zero-based index of the icon to retrieve.
Return value:
The return value is a handle to an icon, otherwise it is NULL.
Usage:
hIcon = ExtractIcon(0, cSourceFile, nIconIndex)

IF hIcon <> 0
    cBuffer = REPLICATE(CHR(0), ICONINFO_SIZE)
    = GetIconInfo(m.hIcon, @cBuffer)
ENDIF
My comment:
You must destroy the icon handle returned by ExtractIcon by calling the DestroyIcon function.

See also: ExtractAssociatedIcon, GetIconInfo, SHGetStockIconInfo
Word Index links for the ExtractIcon :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-08-21 12:00:00
Modified: 2011-01-17 16:42:43
Visited in last 7 days: 31
User Contributed Notes:
kurt krug | 2005-09-28 02:46:28
lost jpegs

Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (107.22.126.144)
12 sec.Function: 'GdipGetDpiX'
24 sec.Function: 'CreateMutex'
37 sec.Function: 'FtpGetFileSize'
48 sec.Function: 'CM_Get_Child_Ex'
1.02 min.Function: 'GetCurrentDirectory'
1.23 min.
Function group: 'Window Property'
1.43 min.Function: 'GetAce'
1.62 min.Function: 'CeRapiInitEx'
1.83 min.Function: 'DeleteObject'
2.08 min.
Function group: 'GDI+ Font'
Google
Advertise here!