
elements, gadgets are not windows: gadgets don’t have window handles,
they don’t receive events and messages, and they aren’t based on TWindow.
Instead, gadgets must be contained in a gadget window. The gadget
window controls the presentation of the gadget, all message processing,
and so on. The gadget receives its commands and direction from the gadget
window.
Decorations are specialized child windows that let the user choose a
Decorations
command, provide a place to give the user information, or somehow allow
for specialized communication with the user.
■ A control bar (TControlBar) lets you arrange a set of buttons on a bar
attached to a window as shortcuts to using menus (the SpeedBar in the
Borland C++ IDE is an example of this functionality).
■ A tool box (TT olBox) lets you arrange a set of buttons on a floatingo
palette.
■ Message bars (TMessageBar) are bars, usually at the bottom of a window,
where you can display information to the user For example, the Borland.
C++ IDE uses a message bar to give you brief descriptions of what menu
commands and SpeedBar buttons do as you press them.
■ Status bars (TStatusBar) are similar to message bars, but have room for
more than one piece of information. The status bar in the Borland C++
IDE shows your position in the edit window whether you’re in insert or,
overtype mode, and error messages.
Windows offers a powerful but complex graphics library called the
Graphics classes
Graphics Device Interface (GDI). ObjectWindows encapsulates GDI to
make it easier to use device context (DC) classes (TDC) and GDI objects
(TGDIObject).
See Chapter 13 for full details on these classes.
With GDI, instead of drawing directly on a device (like the screen or a
DC classes
printer), you draw on a bitmap using a device context (DC). A device context
is a collection of tools, settings, and device information regarding a
graphics device and its current drawing state. This allows for a high degree
of device independence when using GDI functions. The following table lists
the different types of DCs that ObjectWindows encapsulates.
24
OWL P ogrammer’ Guider s