A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z


The GetDC function retrieves a handle of a display device context (DC) for the client area of the specified window. The display device context can be used in subsequent GDI functions to draw in the client area of the window.

Declare Function GetDC Lib "user32" Alias "GetDC" (ByVal hwnd As Long) As Long


Operating Systems Supported
Requires Windows NT 3.1 or later; Requires Windows 95 or later


Parameter Information
- hWnd
Identifies the window whose device context is to be retrieved.

Return Values
If the function succeeds, the return value identifies the device context for the given window’s client area.

If the function fails, the return value is NULL.

Last update: 07 April 2006