The GetDC function retrieves a 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.
Spyware that takes screen captures often uses this function.
HDC GetDC( _In_ HWND hWnd );
- hWnd [in]
- A handle to the window whose DC is to be retrieved. If this value is NULL, GetDC retrieves the DC for the entire screen.
If the function succeeds, the return value is a handle to the DC for the specified window's client area.
If the function fails, the return value is NULL.