OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Selecting and Restoring GDI Objects

You can use the TDC::SelectObject function to place a GDI object into a device context.

There are four versions of the SelectObject function; all of them return void, but each takes different parameters. The version you should use depends on the type of object you are selecting into the device context. The different versions are:

SelectObject(const TBrush& brush);
SelectObject(const TPen& pen);
SelectObject(const TFont& font);
SelectObject(const TPalette& palette, bool forceBG=false);

In addition, TMemoryDC lets you select a bitmap.