OverlayBitmap::beginPaint Method

Prepares the overlay bitmap for graphic operations.
Syntax:
bool beginPaint() const;
Return value:

true on success, false otherwise.

Remarks:

beginPaint creates a device context (HDC) for the OverlayBitmap object. After beginPaint has been called, an application can retrieve a valid device context (HDC) by calling the OverlayBitmap objects' method OverlayBitmap::getDC. With this device context (HDC) GDI functions can be performed on the bitmap of the OverlayBitmap object. The OverlayBitmap object's bitmap is already selected into the device context (HDC) after beginPaint has been called.

The method beginPaint is only needed, if GDI functions need to be called, that are not implemented in the OverlayBitmap class. For example, the GDI function BitBlt needs a preceding call to beginPaint.

Graphic methods of the OverlayBitmap object, such as OverlayBitmap::drawText do not need a preceding call to beginPaint.

When the application no longer needs the device context (HDC), the OverlayBitmap::endPaint method must be called to delete it. Only after the method OverlayBitmap::endPaint has been called, the new graphics are visible on the live video.

See also: OverlayBitmap, OverlayBitmap::endPaint, OverlayBitmap::getDC

<< OverlayBitmap