Skip to content

Latest commit

 

History

History
78 lines (61 loc) · 3.48 KB

DeleteDC.md

File metadata and controls

78 lines (61 loc) · 3.48 KB

Home

Function name : DeleteDC

Group: Device Context - Library: gdi32


Deletes the specified device context (DC).


Code examples:

Placing an arbitrary rectangular area of main VFP window on the Clipboard
How to copy the image of a form to the Clipboard using Bitmap API functions
Creating a device context for the specified printer
Retrieving Printer Device Context using PrintDlg function
Retrieving graphic capabilities of default printer
How to print FoxPro form
Storing screen shot of a form to bitmap file
Storing content of the Clipboard to a bitmap file
Using the LoadImage function to have a bitmap file loaded and displayed on VFP main window
How to print a bitmap file
Drawing Windows predefined bitmaps using the LoadBitmap functions
Displaying bitmap using the AlphaBlend function
Splash Screen for the VFP application
Bitmap Class for Visual FoxPro application
How to put a horizontal text scrolling on the form (a news line, marquee)
How to put a vertical text scrolling on the form (a movie cast)
Displaying animated images on FoxPro form with BitBlt and StretchBlt functions
Printing text with the Escape function
Configuring DEVMODE structure for a printer
Subclassing CommandButton control to create BackColor property
Vertical Label control
How to print picture stored in enhanced-format metafile (*.emf)
How to print FoxPro form -- II
GDI+: printing image file
GDI+: sending image of FoxPro form to printer
How to convert a bitmap file to monochrome format (1 bpp)
Converting image file to .ICO file
How to make a VFP form fading out when released (GDI version)
Printing Image File, programmatically set print page orientation to landscape

Declaration:

BOOL DeleteDC(
  HDC hdc   // handle to DC
);  

FoxPro declaration:

DECLARE INTEGER DeleteDC IN gdi32 INTEGER hdc  

Parameters:

hdc [in] Handle to the device context.


Return value:

If the function succeeds, the return value is nonzero.


Comments:

From the GDI Black Book: remember, use the ReleaseDC function only for a display device context that was retrieved from the GDI device-context cache. After you"re done with the memory device context, you must free it by using the DeleteDC function.

Finally:

  • use ReleaseDC for forms (the hwnd used as the first parameter)
  • use DeleteDC for memory device contexts (e.g. CreateCompatibleDC)