Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Loading of *.gif or *.jpeg files in VC++ controls

Loading of *.gif or *.jpeg files in VC++ controls

Scheduled Pinned Locked Moved C / C++ / MFC
c++
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dhanush
    wrote on last edited by
    #1

    Hi, How can load *.gif or *.jpeg files on a dialog or a button, if i can please tell how it is . Thank U very much.:(

    C L 2 Replies Last reply
    0
    • D Dhanush

      Hi, How can load *.gif or *.jpeg files on a dialog or a button, if i can please tell how it is . Thank U very much.:(

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      you cannot use GIF without a license (in the US, Germany, UK, Japan, etc.). if you want to load JPG, there are articles on this site (see the Bitmap and Palettes section). or you could try a 3-rd party toolkit, like ImgSource. -c ------------------------------ Smaller Animals Software, Inc. http://www.smalleranimals.com

      1 Reply Last reply
      0
      • D Dhanush

        Hi, How can load *.gif or *.jpeg files on a dialog or a button, if i can please tell how it is . Thank U very much.:(

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Try use function OleLoadPicturePath According to documentation: The stream must be in BMP (bitmap), JPEG, WMF (metafile), ICO (icon) or GIF format

        L 1 Reply Last reply
        0
        • L Lost User

          Try use function OleLoadPicturePath According to documentation: The stream must be in BMP (bitmap), JPEG, WMF (metafile), ICO (icon) or GIF format

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Here you go. You have to declare some CBitmapButton objects for each button in your main class header file that you are using this buttons. Then add the usually message handlers. Load your bitmap picture in your resource bitmap and use a string name "Name" to label your bitmap that you want over your button. Then that should be the same name as the caption on your button. Make sure you have owner draw button checked. Add a OnInitDlg member function and call your CBitmapButton objects with autoload. Compile and run and you should have your bitmap buttons.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups