# Function Reference

# _WinAPI_MirrorIcon

Reverses (mirrors) icons so that they are displayed correctly on a mirrored device context

#include <WinAPIIcons.au3>
_WinAPI_MirrorIcon ( $hIcon [, $bDelete = False] )

## Parameters

$hIcon | Handle to the icon.
$bDelete | [optional] Specifies whether to delete the icon after the function is successful, valid values: True - Icon will be deleted if the function succeeds. False - Do not delete, you must release the icon when you are finished using it (Default).

## Return Value

Success: | Handle to the newly created icon.
Failure: | 0 and sets the @error flag to non-zero.

## Remarks

When you are finished using the icon, destroy it using the _WinAPI_DestroyIcon() function.

## Related

_WinAPI_DestroyIcon

## See Also

Search MirrorIcon in MSDN Library.

## Example

    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WinAPIIcons.au3>
    #include <WinAPIShellEx.au3>

    Local $hIcon = _WinAPI_ShellExtractIcon(@SystemDir & '\shell32.dll', 4, 32, 32)

    GUICreate('Test ' & StringReplace(@ScriptName, '.au3', '()'), 156, 108)
    GUICtrlCreateIcon('', 0, 30, 38, 32, 32)
    GUICtrlSendMsg(-1, $STM_SETIMAGE, 1, $hIcon)
    GUICtrlCreateIcon('', 0, 88, 38, 32, 32)
    GUICtrlSendMsg(-1, $STM_SETIMAGE, 1, _WinAPI_MirrorIcon($hIcon))
    GUISetState(@SW_SHOW)

    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE