Click to See Complete Forum and Search --> : HOW TO DIAPLY IMAGE IN DIALOG??


October 12th, 1999, 10:15 AM
Hi,

How to display a gif or jpeg image in a dialog box. I don't wannna use any ocx or active-x controls. Is there anty way to do this??

Thanx in advance.

JedyMaster
October 12th, 1999, 10:56 AM
Hi!

The easiest way to achieve that is to use an ActiveX but you don't want to use them... So you will have to spend a lot of effort in programming...

First, I recommand you don't support the Gif since there are royalty to pay if you use them...

One way I can think of is:

1. Create a memory DC which will contain the image
2. Then open your file and extract the image data to the Memory DC (It is the hard part!)
3. Then copy the contain to your dialogbox's DC (Use BitBlt or StretchBlt)

If you have some controls on your dialogbox, then have a look at:
http://www.codeguru.com/dialog/BmpDlg.shtml

For step 2 I suggest you look at the following site:

http://www.wotsit.org/

P.S.:
This procedure will take time and I suggest you reconsider using a activeX control. You could do the same in just a few minutes...

Hope this helps,

JedyMaster
dlavoie@pgsystem.com