###User Defined Function###
_WinAPI_CopyImage

###Description###
Creates a new image (icon, cursor, or bitmap) and copies the attributes of the specified image to the new one.

###Syntax###
#include <WinAPIGdi.au3>
_WinAPI_CopyImage ( $hImage [, $iType = 0 [, $xDesired = 0 [, $yDesired = 0 [, $iFlags = 0]]]] )


###Parameters###
@@ParamTable@@
$hImage
	Handle to the image to be copied.
$iType
	[optional] Specifies the type of image to be copied. This parameter can be one of the following values.
	$IMAGE_BITMAP 'Default)
	$IMAGE_CURSOR
	$IMAGE_ICON
$xDesired
	[optional] Specifies the desired width, in pixels, of the image. If this is zero (Default), then the returned image will
	have the same width as the original $hImage.
$yDesired
	[optional] Specifies the desired height, in pixels, of the image. If this is zero (Default), then the returned image will
	have the same height as the original $hImage.
$iFlags
	[optional] This parameter can be one or more of the following values.
	$LR_DEFAULTCOLOR (Default)
	$LR_COPYDELETEORG
	$LR_COPYFROMRESOURCE
	$LR_COPYRETURNORG
	$LR_CREATEDIBSECTION
	$LR_DEFAULTSIZE
	$LR_MONOCHROME
@@End@@

###ReturnValue###
@@ReturnTable@@
Success 	Handle to the newly created image.
Failure 	0, call <a href="_WinAPI_GetLastError.htm">_WinAPI_GetLastError()</a> to get extended error information.
@@End@@


###Remarks###
When you are finished using the resource, you can release its associated memory by calling _WinAPI_DeleteObject()
function respectively for bitmaps, cursors, or icons. The system automatically deletes the resource when its
process terminates, however, calling the appropriate function saves memory and decreases the size of the
process's working set.


###Related###


###See Also###
@@MsdnLink@@ CopyImage
