# Function Reference

# _WinAPI_GetUpdateRgn

Retrieves the update region of a window by copying it into the specified region

#include <WinAPIGdi.au3>
_WinAPI_GetUpdateRgn ( $hWnd, $hRgn [, $bErase = True] )

## Parameters

$hWnd | Handle to the window with an update region that is to be retrieved.
$hRgn | Handle to the region to receive the update region.
$bErase | [optional] Specifies whether the background in the update region is to be erased, valid values: True - The background is erased (Default). False - The background remains unchanged.

## Return Value

Success: | The value that indicates the complexity of the resulting region; it can be one of the following values. $COMPLEXREGION $NULLREGION $SIMPLEREGION
Failure: | 0.

## Remarks

_WinAPI_BeginPaint() automatically validates the update region, so any call to _WinAPI_GetUpdateRgn() made
immediately after the call to _WinAPI_BeginPaint() retrieves an empty update region.

## Related

_WinAPI_BeginPaint

## See Also

Search GetUpdateRgn in MSDN Library.