Loads the specified icon resource from the executable (.exe) file associated with an application instance.
Drawing standard Windows icons
How to view icons stored in executable files (Icon Viewer)
HICON LoadIcon(
HINSTANCE hInstance, // handle to application instance
LPCTSTR lpIconName // name string or resource identifier
); DECLARE INTEGER LoadIcon IN user32;
INTEGER hInstance,;
INTEGER lpIconName 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.
If the function succeeds, the return value is a handle to the newly loaded icon. If the function fails, the return value is NULL.
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.
Home