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

Thread: images

  1. #1
    Join Date
    May 2006
    Location
    missouri
    Posts
    3

    Question images

    is there anyway to display images in an application and if you can how do you do it?

  2. #2
    Join Date
    Oct 2002
    Location
    Tx, US
    Posts
    208

    Re: images

    What kind of images? Every image type has its own format.

    Vinod

  3. #3
    Join Date
    Jun 2005
    Location
    Chennai , India
    Posts
    1,375

    Thumbs up Re: images

    Quote Originally Posted by drbearded
    is there anyway to display images in an application and if you can how do you do it?
    It's dependent on the system your running under.
    For example, in Windows, you'd basically use
    the BitBlt() api to draw a bitmap to a windows device context (dc).


    In DOS, one would probably draw the bitmap by physically writing
    the video memory of the graphics adapter.


    In other systems, there will be some method similar to BitBlt() above,
    but the refs. for those api:s are contained in the particular sdk for the
    operating system...
    It takes seconds for rating…that actually compensates the minutes taken for giving answers
    The biggest guru-mantra is: Never share your secrets with anybody. It will destroy you.
    Regards, Be generous->Rate people
    Jayender!!

  4. #4
    Join Date
    Jun 2006
    Posts
    3

    Smile Re: images

    Quote Originally Posted by drbearded
    is there anyway to display images in an application and if you can how do you do it?
    u r not mention clearly what type of image . if it is .bmp then u use the following API's

    LoadImage () ; or LoadBitmap() and corrosponding DestryObject() ;
    BitBlt(); or StretchDIBits();

    pls try.

  5. #5
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: images

    Check the articles at http://www.codeguru.com/Cpp/G-M/bitmap/ to learn more about loading/saving/displaying/manipulating images.
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

  6. #6
    Join Date
    May 2006
    Location
    missouri
    Posts
    3

    Re: images

    the image i wanted to use is a gif

  7. #7
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: images

    Quote Originally Posted by drbearded
    the image i wanted to use is a gif
    Did you even bother to take a look at the link I posted?
    The first link says: Going from a JPG/GIF/BMP File to a HBITMAP File Using Plain API
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

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