Using Win32 functions in Visual FoxPro Image Gallery
Icon
..msdn
CopyIcon
DestroyIcon
DrawIcon
ExtractAssociatedIcon
ExtractIcon
GetIconInfo
LoadIcon
Code examples:
Displaying icons in the system tray (VFP9)
GDI+: custom Clock Control
Retrieving information about the specified icon
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
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:
Displaying icons in the system tray (VFP9)
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
GDI+: custom Clock Control
Retrieving information about the specified icon
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-12-07 19:53:03
Modified: 2011-01-17 16:43:45
Visited in last 7 days: 44
User Contributed Notes:
There are no notes on this subject.


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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.242.205.33)
8 sec.Function: 'GdipCreateHICONFromBitmap'
17 sec.Function: 'CeGetSystemPowerStatusEx'
25 sec.
Function group: 'GDI+ Bitmap'
34 sec.Function: 'GetModuleBaseName'
42 sec.Function: 'DestroyWindow'
51 sec.Function: 'GdipGetImagePalette'
1 min.Function: 'GdipInvertMatrix'
1.13 min.Function: 'GetCurrentThread'
1.25 min.Function: 'FindFirstFile'
1.4 min.Function: 'GdipShearMatrix'
Google
Advertise here!