Using Win32 functions in Visual FoxPro Image Gallery
Icon
..msdn
CopyIcon
DestroyIcon
DrawIcon
ExtractAssociatedIcon
ExtractIcon
GetIconInfo
LoadIcon
Code examples:
Drawing standard Windows icons
How to view icons stored in executable files (Icon Viewer)
LoadIcon
..msdn    Add comment     W32 Constants      Translate this page
Loads the specified icon resource from the executable (.exe) file associated with an application instance.
Code examples:
Drawing standard Windows icons
How to view icons stored in executable files (Icon Viewer)
Declaration:
HICON LoadIcon(
  HINSTANCE hInstance, // handle to application instance
  LPCTSTR lpIconName   // name string or resource identifier
);
FoxPro declaration:
DECLARE INTEGER LoadIcon IN user32;
    INTEGER hInstance,;
    INTEGER lpIconName
Parameters:
hInstance
[in] Handle to an instance of the module whose executable file contains the icon to be loaded. This parameter must be NULL when a standard icon is being loaded.

lpIconName
[in] Pointer to a null-terminated string that contains the name of the icon resource to be loaded.
Return value:
If the function succeeds, the return value is a handle to the newly loaded icon.
If the function fails, the return value is NULL.
My comment:
This function has been superseded by the LoadImage function.

Do not use DestroyIcon() to release created handle. A shared icon (this is the one) is valid as long as the module from which it was loaded remains in memory. Same for LoadImage and CopyImage.
Word Index links for the LoadIcon :
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: 2001-12-07 18:28:55
Visited in last 7 days: 41
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.234.255.29)
13 sec.Function: 'ReleaseCapture'
28 sec.Function: 'DuplicateHandle'
43 sec.Function: 'SetConsoleTitle'
59 sec.Function: 'ExitWindowsEx'
1.27 min.Function: 'CryptGetKeyParam'
1.53 min.Function: 'LookupAccountName'
1.8 min.Function: 'CryptBinaryToString'
2.05 min.Function: 'FindWindow'
2.28 min.Function: 'LoadResource'
2.57 min.Function: 'SQLExecDirect'
Google
Advertise here!