 |
ExtractAssociatedIcon ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
The ExtractAssociatedIcon function returns a handle to an indexed icon found in a file or an icon found in an associated executable file. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
HICON ExtractAssociatedIcon(
HINSTANCE hInst, // application instance handle
LPTSTR lpIconPath, // file name
LPWORD lpiIcon // icon index
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER ExtractAssociatedIcon IN shell32;
INTEGER hInst,;
STRING lpIconPath,;
INTEGER @ lpiIcon
|
 |
 |
 |
| Parameters: |
 |
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. |
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is an icon handle. If the function fails, the return value is NULL. |
 |
 |
| Usage: |
 |
PROCEDURE GetDefaultIcon
* loads application icon
LOCAL cBuffer, nBufsize, nIconIndex, hIcon
cBuffer = REPLICATE(CHR(0), MAX_PATH)
nBufsize = GetModuleFileName (0, @cBuffer, MAX_PATH)
cBuffer = LEFT(cBuffer, nBufsize)
nIconIndex = 0 && works as a reference only
hIcon = ExtractAssociatedIcon(0, cBuffer, @nIconIndex)
RETURN m.hIcon
|
 |
 |
| My comment: |
 |
| See also: ExtractIcon |
 |
 |
| Word Index links for the ExtractAssociatedIcon : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-12-07 19:53:03 | | Modified: | 2011-01-17 16:43:45 | Visited in last 7 days: 20 |