Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 2.58 KB

GetDC.md

File metadata and controls

68 lines (50 loc) · 2.58 KB

Home

Function name : GetDC

Group: Device Context - Library: user32


Note that this document contains some links to the old news2news website which does not work at the moment. This material will be available sometime in the future.

The GetDC function retrieves a handle of a display device context (DC) for the client area of the specified window


Code examples:

How to view icons stored in executable files (Icon Viewer) - II
Printing text on the client area of the main VFP window
Using GetNearestColor
Creating a window using CreateWindowEx function
Placing an arbitrary rectangular area of main VFP window on the Clipboard
Drawing standard Windows icons
How to view icons stored in executable files (Icon Viewer)
Converting twips to pixels and vice versa
Retrieving graphic capabilities of your display
Form Magnifier
Placing On-screen Alert on top of all windows
How to make a VFP form fading out when released (GDI version)
GDI+: Scrolling through large image using the mouse
GDI+: Creating thumbnails to preview images in a directory
GDI+ fun: roach-infested desktop
GDI+: Color Transparency
GDI+: Implementing image scrolling with inertia
GDI+: custom control, base class

Declaration:

HDC GetDC(
    HWND  hWnd 	// handle of window
   );  

FoxPro declaration:

DECLARE INTEGER GetDC IN user32 INTEGER hwnd
  

Parameters:

hWnd Identifies the window whose device context is to be retrieved


Return value:

If the function succeeds, the return value identifies the device context for the given window"s client area


Comments:

See also: GetWindowDC, WindowFromDC.