 |
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: |
 |
|
|
 |
 |
| 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: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-08-21 12:00:00 | | Modified: | 2011-01-17 16:42:43 | Visited in last 7 days: 29 |