PLACING BITMAPS IN DIALOG BOXES IN OWL 2.0
======================================================

Introduction
------------

There are many requests placed on the Borland C++/Windows forum on how
to place bitmaps in dialog boxes in OWL 2.0

The code here in BMPCTL.CPP provides a simple class for placing bitmaps
in dialogs together with some useful extra functionality for placing 3D
borders around them


How to use bitmap controls
--------------------------

To use this code simply place a static control (black frames work well
for this) in the dialog box where you want the bitmap to appear, give it
the same id value as the bitmap resource, then create a TBitmapControl
object in your TDialog constructor passing it that id value

The control here will automatically adjust the size of the control to
the size of the bitmap, so there is no need to be 100% accurate in the
positioning of the placeholder control in the dialog box


So what do I need to do?
------------------------

As stated earlier, you need to do three things:

- create a bitmap resource in your .rc file and give it an id value
- place a static control in your dialog box and give it the same id
  as the bitmap resource
- create a TBitmapControl object in the constructor of your TDialog-
  derived dialog object.

The TBitmapControl constructor has the following definition:

  TBitmapControl (TWindow* parent,			// parent (TDialog-derived object)
				  int resourceID,			// id (same as bitmap resource)
				  Style style = Recessed,   // border style
				  TModule* module = NULL);  // module where bitmap is stored

The style parameter has the following values:

  TBitmapControl::NoBorder		// no border at all
  TBitmapControl::Plain			// plain black single-line border
  TBitmapControl::Recessed		// recessed Ctl3d-style border (the default)
  TBitmapControl::Raised		// raised 3d border

You may want to experiment with these to find what works best in your dialogs.
If there are any further styles you'd like to see, let me know.


Corrections/Amendments in this version
--------------------------------------

Update 1.01: (revised by Russell Morris)

	Support for 256 color bitmaps.

Update 1.02: (revised by Russell Morris)

	The palette is now selected into the DC and realized correctly
	at every Paint() call.  Version 1.01 did not select the
	palette correctly or realize it.


Getting in touch with the author
--------------------------------

If you have any experiences good or bad using this code, I would
appreciate hearing from you.  It is the great feedback I get that
leads to the new features being added, which benefits everybody.

This code is distributed as FreeWare.

Steve Saxon
London, England.
CIS: 100321,2355