OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Accessing TBitmap

You can access TBitmap through an HBITMAP or as a BITMAP structure.

To get an HBITMAP from a TBitmap object, use the HBITMAP() operator with the TBitmap object as the parameter. The HBITMAP() operator, listed below, is almost never explicitly invoked:

{
return bitmap;
}

This code automatically invokes the HBITMAP() conversion operator to cast the TBitmap object to the correct type. To convert a TBitmap object to a BITMAP structure, use the TBitmap::GetObject function:

bool GetBitmap(BITMAP far& dest)
{
TBitmap bitmap(200, 100);
return bitmap.GetObject(dest);
}

The GetObject function fills out only the width, height, and color format information of the BITMAP structure. You can get the actual bitmap bits with the TBitmap::GetBitmapBits function.

See Also