This class is a “spin off” of the CGTetris
application.
There is only one public method:
BOOL SetBitmap(UINT uResource, int Type =
CBitmapDialog::BITMAP_TILE);
Type might be one of the following
types:
CBitmapDialog::BITMAP_TILE
// tile the bitmap to fill the dialog
CBitmapDialog::BITMAP_STRETCH
// stretch the bitmap so it will fit to the dialog
CBitmapDialog::BITMAP_CENTER
// center the bitmap inside the dialog
Usage
The source consists of 6 files:
BitmapDialog.[h|cpp]
dib256.[h|cpp]
dibpal.[h|cpp]
add all these files to your project.
create a dialog template
add a bitmap resource that you want for the background
create a class for the dialog template
change all occurencies of CDialog in your dialog’s .cpp and
.h to CBitmapDialog
don’t forget to insert “BitmapDialog.h” in either your dialog’s header
file or in “stdafx.h”
call the CBitmapDialog::SetBitmap() method (in your WM_INITDIALOG handler
for instance)
compile your project