User32GetDC(IntPtr) Method
Retrieves a
IntPtr handle to a device context (DC) for the client area of a specified window or for the entire screen.
You can use the returned handle in subsequent GDI functions to draw in the DC.
The device context is an opaque data structure, whose values are used internally by GDI.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("User32.dll")]
public static IntPtr GetDC(
IntPtr hWnd
)
<DllImportAttribute("User32.dll">]
Public Shared Function GetDC (
hWnd As IntPtr
) As IntPtr
Dim hWnd As IntPtr
Dim returnValue As IntPtr
returnValue = User32.GetDC(hWnd)
public:
[DllImportAttribute(L"User32.dll")]
static IntPtr GetDC(
IntPtr hWnd
)
[<DllImportAttribute("User32.dll")>]
static member GetDC :
hWnd : IntPtr -> IntPtr
No code example is currently available or this language may not be supported.
- hWnd IntPtr
-
A IntPtr handle to the window whose DC is to be retrieved.
If this value is Zero, GetDC(IntPtr) retrieves the DC for the entire screen.
IntPtr
If the function succeeds, the return value is a
IntPtr handle to the DC for the specified window's client area.
If the function fails, the return value is
Zero.