GetBitmapDC method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

L_HDC GetBitmapDC (void);

Delphi Syntax

GetBitmapDC: L_HDC;

Overview

Refer to Using the Windows API.

Remarks

Provides a powerful set of graphics features by creating a Microsoft Windows device context, using the bitmap as the display surface. If you call this method, you must call the ReleaseBitmapDC method before using other properties or methods that affect the bitmap.

This gives you many drawing capabilities such as paint, erase, color erase and brush, pen, spray gun, flood fill, color tube, text overlay, curve, line, rectangle, polygon, ellipse, freehand shapes, cut and paste, and more.

All Windows GDI functions can be used to draw to the bitmap using the returned HDC. You should use the ReleaseBitmapDC method when the bitmap no longer needs to be available for drawing functions.

If a region is defined for the bitmap, GDI functions act only on the region, not on the entire bitmap.

Note:

The LEAD DIB driver (LTVDD14W.DRV) supports the GetBitmapDC method. It allows any of the Windows GDI functions to draw to the bitmap regardless of the video resolution of the display being used. This allows drawing to a 24-bit bitmap with a 4- or 8-bit video driver.

See Also

Topics:

Raster Images: Creating and Deleting Images

 

Raster Images: Drawing on a Bitmap

 

Examining and Altering Bitmaps