CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    HOW TO DIAPLY IMAGE IN DIALOG??

    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.



  2. #2
    Join Date
    Jun 1999
    Location
    Rimouski,Quebec,Canada
    Posts
    99

    Re: HOW TO DIAPLY IMAGE IN DIALOG??

    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
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured