Bitmap Dialog Class
Posted
by Joerg Koenig
on October 18th, 1998
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

Comments
WORK like a charm
Posted by gap001 on 10/08/2005 08:34amawesome,
Replyreadonly
Posted by Legacy on 10/21/2003 12:00amOriginally posted by: bruno leclerc
In OnCtlColor function, I would like to know if the ctrl is readonly or not. How can I do ? GetWindowLong with ES_READONLY seems to not work.
ReplyThanks
Scroll Redraw background
Posted by Legacy on 04/08/2003 12:00amOriginally posted by: Marcus Vinicius
Hello,
I need make a program that have a background with height superior at the window. I made the union of two projects (This and a scrolling project) but when i roll the scroll the background can�t be redrawing.
Good Bytes,
OctogonEyes (Marcus Vinicius Antunes - Brazil)
ReplyHaving a problem over time
Posted by Legacy on 04/04/2003 12:00amOriginally posted by: Bill Hamlin
I've been using this for over a year now and it works great, except for one little problem. Something happens over time that causes the whole Windows processing of colors to go haywire.
For one thing the BMPDLG app looks awful and has to be restarted. But if I do something else, like rightclick on an item in the taskbar along the bottom, the popup menu has the wrong colors. Everything is just a little funky, and doesn't get cleared until I restart the machine.
Has anyone else seen this, and what do you suppose is happening?
Thanks,
ReplyBill Hamlin
COPYRIGHT
Posted by Legacy on 02/20/2003 12:00amOriginally posted by: Chris Kohlhepp
Hello All,
I noticed that the header files of the bitmal dialog class contain the following comment : "This is free software. You may redistribute it by any means providing it is not sold for profit without the authors written consent." Kindly allow me to clarify this. Every author at codeguru is giving consent for anyone to use their code even - in commercial applications, i.e "sold for profit". People may, however, not sell the source code for example to re-print it in a book, etc. without the author's permission as the author does retain copyright.
Just in case anybody was wondering...
Chris Kohlhepp
ReplyBitmap Dialog Class
Posted by Legacy on 12/11/2002 12:00amOriginally posted by: Jyoti
Replythank you..
Posted by Legacy on 10/04/2002 12:00amOriginally posted by: sharkren
very much
Reply
Thanks
Posted by Legacy on 09/20/2002 12:00amOriginally posted by: MT
Thanks for the code. Good job.
Replymulitple images on the dialog box
Posted by Legacy on 09/16/2002 12:00amOriginally posted by: bvictor
How do we load two or three separate images(bitmaps or other formats) on the dialog box ?
ReplyBitmap error
Posted by Legacy on 04/06/2002 12:00amOriginally posted by: Johnny
I cannot figure this thing out....It keeps on spitting out an error " fatal error C1083: Cannot open include file: 'BitmapDialog.h': No such file or directory" I have BitmapDialog.h inside of the header files. Not to sure what i should do. Any suggestions?
ReplyLoading, Please Wait ...