# Function Reference

# _WinAPI_ReleaseDC

Releases a device context

#include <WinAPIGdiDC.au3>
_WinAPI_ReleaseDC ( $hWnd, $hDC )

## Parameters

$hWnd | Handle of window
$hDC | Identifies the device context to be released

## Return Value

Success: | True
Failure: | False

## Remarks

The application must call the _WinAPI_ReleaseDC() function for each call to the _WinAPI_GetWindowDC() function and for
each call to the _WinAPI_GetDC() function that retrieves a common device context.

## Related

_WinAPI_DeleteDC, _WinAPI_GetDC, _WinAPI_GetWindowDC

## See Also

Search ReleaseDC in MSDN Library.

## Example

    #include <MsgBoxConstants.au3>
    #include <WinAPIGdiDC.au3>

    Example()

    Func Example()
        Local $hWnd, $hDC
        $hWnd = GUICreate("test")
        $hDC = _WinAPI_GetDC($hWnd)
        MsgBox($MB_SYSTEMMODAL, "Handle", "Display Device: " & $hDC)
        _WinAPI_ReleaseDC($hWnd, $hDC)
    EndFunc   ;==>Example