IC Imaging Control C++

OverlayBitmap::beginPaint Method

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

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us