Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1.17 KB

CopyIcon.md

File metadata and controls

50 lines (32 loc) · 1.17 KB

Home

Function name : CopyIcon

Group: Icon - Library: user32


Copies the specified icon from another module to the current module.


Code examples:

Storing screen shot of a form to bitmap file

Declaration:

HICON CopyIcon(
	HICON hIcon
);  

FoxPro declaration:

DECLARE INTEGER CopyIcon IN user32 INTEGER hIcon  

Parameters:

hIcon [in] Handle to the icon to be copied.


Return value:

If the function succeeds, the return value is a handle to the duplicate icon.


Comments:

The CopyIcon function enables an application or dynamic-link library (DLL) to get its own handle to an icon owned by another module. If the other module is freed, the application icon will still be able to use the icon.

Before closing, an application must call the DestroyIcon function to free any system resources associated with the icon.

See also: LoadIcon, DrawIcon.