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. [MFC] How to use the Picture Control to show jpg image?

[MFC] How to use the Picture Control to show jpg image?

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestion
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.
  • Y Offline
    Y Offline
    yu jian
    wrote on last edited by
    #1

    The jpeg image is bigger than the Picture Control, and the jpeg file is in the local disk. It is no problem to show jpeg image, I can use the CImage to load the jpeg image and then user Picture Control's SetBitmap() method to display this image. But how to zoom to display this jpeg?

    J M 2 Replies Last reply
    0
    • Y yu jian

      The jpeg image is bigger than the Picture Control, and the jpeg file is in the local disk. It is no problem to show jpeg image, I can use the CImage to load the jpeg image and then user Picture Control's SetBitmap() method to display this image. But how to zoom to display this jpeg?

      J Offline
      J Offline
      jeron1
      wrote on last edited by
      #2

      Maybe this[^] article might help.

      Y 1 Reply Last reply
      0
      • Y yu jian

        The jpeg image is bigger than the Picture Control, and the jpeg file is in the local disk. It is no problem to show jpeg image, I can use the CImage to load the jpeg image and then user Picture Control's SetBitmap() method to display this image. But how to zoom to display this jpeg?

        M Offline
        M Offline
        Michael Haephrati
        wrote on last edited by
        #3

        If you only need the image to fit the window (without adding zoom in and zoom out capabilities), just set the image control attribute "Real Size Image" to FALSE.

        1 Reply Last reply
        0
        • J jeron1

          Maybe this[^] article might help.

          Y Offline
          Y Offline
          yu jian
          wrote on last edited by
          #4

          Thank you jeron1, I set the Picture Control's Type property as "Frame", and then use the Graphic to Graphics's DrawImage to draw iamge. +5 :-D

          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