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. insert Picture

insert Picture

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorial
7 Posts 5 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.
  • B Offline
    B Offline
    bhat
    wrote on last edited by
    #1

    Hi I want to insert the picture in the picture control in VC++ 6...... tell me how to do it

    AbidBhat

    M H 2 Replies Last reply
    0
    • B bhat

      Hi I want to insert the picture in the picture control in VC++ 6...... tell me how to do it

      AbidBhat

      M Offline
      M Offline
      Maxwell Chen
      wrote on last edited by
      #2

      Steps: 1) Add a .bmp image into resources, 2) Add a Picture Control onto the dialog template with the dialog editor, 3) Assign the resource ID of the image to the property of the Picture Control.

      Maxwell Chen

      B 1 Reply Last reply
      0
      • M Maxwell Chen

        Steps: 1) Add a .bmp image into resources, 2) Add a Picture Control onto the dialog template with the dialog editor, 3) Assign the resource ID of the image to the property of the Picture Control.

        Maxwell Chen

        B Offline
        B Offline
        bhat
        wrote on last edited by
        #3

        thanks!

        AbidBhat

        1 Reply Last reply
        0
        • B bhat

          Hi I want to insert the picture in the picture control in VC++ 6...... tell me how to do it

          AbidBhat

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          If you want to insert bmp you can use of resource of program or for other foramts like jpg you can use of CImage class or GDI+.

          T 1 Reply Last reply
          0
          • H Hamid Taebi

            If you want to insert bmp you can use of resource of program or for other foramts like jpg you can use of CImage class or GDI+.

            T Offline
            T Offline
            tina newcoder
            wrote on last edited by
            #5

            Hamid. wrote:

            for other foramts like jpg you can use of CImage class or GDI+.

            can u plz elaborate the procedure for doing this a little more.... thanx in advance .... :-O

            H J 2 Replies Last reply
            0
            • T tina newcoder

              Hamid. wrote:

              for other foramts like jpg you can use of CImage class or GDI+.

              can u plz elaborate the procedure for doing this a little more.... thanx in advance .... :-O

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              Not problem for read bmp files you can use of LoadImage and its simple to use for read other formats like jpg you can use like this #incldue AtlImage.h CImage m; m.Load("c:\\1.jpg"); m.BitBlt(...); and in the last use of m.Destro();

              1 Reply Last reply
              0
              • T tina newcoder

                Hamid. wrote:

                for other foramts like jpg you can use of CImage class or GDI+.

                can u plz elaborate the procedure for doing this a little more.... thanx in advance .... :-O

                J Offline
                J Offline
                JohnCz
                wrote on last edited by
                #7

                The simplest way is to create bitmap in the resource editor. So-called picture control is nothing but a static control that has (among others) SS_BITMAP style. Once you insert control and choose appropriate style, choose Bitmap type in a property box and assign ID of the bitmap image you want to display using the same property box. That is all you need to do unless you want to customize display and control how images are displayed.

                JohnCz MS C++ MVP

                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