A SERVICE OF

logo

TFont lets you easily use Windows fonts. Y u can construct a font witho
custom specifications, or from an existing font handle, font object, or
logical font (LOGFONT) structure.
TPalette encapsulates a GDI palette. Y u can construct a new palette oro
use existing palettes from various color table types that are used by DIBs.
TBitmap contains Windows bitmaps. Y u can construct a bitmap fromo
many sources, including files, bitmap handles, application resources, and
more.
TRegion defines a region in a window. Y u can construct a region ino
numerous shapes, including rectangles, ellipses, and polygons. TRegion is
a pseudo-GDI object; it isn’t derived from TGdiObject.
TIcon encapsulates Windows icons. Y u can construct an icon from ao
resource or explicit information. TIcon is a pseudo-GDI object.
TCursor encapsulates the Windows cursor Y u can construct a cursor. o
from a resource or explicit information.
TDib encapsulates the device-independent bitmap (DIB) class. DIBs have
no Windows handle; instead they are just a structure containing format
and palette information and a collection of bits (pixels). This class
provides a convenient way to work with DIBs like any other GDI object.
A DIB is what is really inside a .BMP file, in bitmap resources, and what
is put on the Clipboard as a DIB. TDib is a pseudo-GDI object.
Changes to encapsulated GDI functions
Many of the functions in the ObjectWindows GDI classes might look
familiar to you; this is because many of them have the same names and
very nearly if not exactly the same function signature as regular Windows, ,
API functions. Because the ObjectWindows GDI classes replicate the
functionality of so many Windows objects, there was no need to alter the
existing terminology Therefore, function names and signatures have been.
deliberately kept as close as possible to what you are used to in the
standard Windows GDI functions.
Some improvements, however have been made to the functions. These,
improvements, many of which are discussed in this section, include such
things as cracking packed return values and using ObjectWindows objects
in place of Windows-defined structures.
None of these changes are hard and fast rules; just because a function can
somehow be converted doesn’t mean it necessarily has been. But if you see
an ObjectWindows function with the same name as a Windows API
288
OWL P ogrammer’ Guider s