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. "How to display bitmaps at runtime"

"How to display bitmaps at runtime"

Scheduled Pinned Locked Moved C / C++ / MFC
graphicstutorialquestion
8 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.
  • H Offline
    H Offline
    harsh_2961
    wrote on last edited by
    #1

    hi, I am using picture control and created a control variable for it.. i need to set bitmap programatically by using the control vareiable i created .. any idea on how to do it... ? and can it be done by setbitmap()?

    Harsha

    H N 2 Replies Last reply
    0
    • H harsh_2961

      hi, I am using picture control and created a control variable for it.. i need to set bitmap programatically by using the control vareiable i created .. any idea on how to do it... ? and can it be done by setbitmap()?

      Harsha

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

      If you have a static you can set bitmap with SetBitmap for this control,Is this your question ?


      WhiteSky


      H 1 Reply Last reply
      0
      • H Hamid Taebi

        If you have a static you can set bitmap with SetBitmap for this control,Is this your question ?


        WhiteSky


        H Offline
        H Offline
        harsh_2961
        wrote on last edited by
        #3

        i have two bit maps to be displayed on two different conditions on a same picture control.. my question is how we can do it ?

        Harsha

        H 1 Reply Last reply
        0
        • H harsh_2961

          hi, I am using picture control and created a control variable for it.. i need to set bitmap programatically by using the control vareiable i created .. any idea on how to do it... ? and can it be done by setbitmap()?

          Harsha

          N Offline
          N Offline
          Naveen
          wrote on last edited by
          #4

          If you have the bitmap in the resource, create an object of CBitmap. call LoadBitmap function of it and then pass this obejct to SetBitmap function If you want to load the bitmap from the file, use the LoadImage function. It will return the handle of HBITMAP, Attach it to CBitmap object and then pass this object to the SetBitmap function.

          nave

          H 1 Reply Last reply
          0
          • H harsh_2961

            i have two bit maps to be displayed on two different conditions on a same picture control.. my question is how we can do it ?

            Harsha

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

            Do you want to show two bitmaps(two status) where you want to change this status when you click a button?then use of SetBitmap.(if isnt your answer can you more explain,please)


            WhiteSky


            H 1 Reply Last reply
            0
            • N Naveen

              If you have the bitmap in the resource, create an object of CBitmap. call LoadBitmap function of it and then pass this obejct to SetBitmap function If you want to load the bitmap from the file, use the LoadImage function. It will return the handle of HBITMAP, Attach it to CBitmap object and then pass this object to the SetBitmap function.

              nave

              H Offline
              H Offline
              harsh_2961
              wrote on last edited by
              #6

              ya thanks its working :)

              Harsha

              1 Reply Last reply
              0
              • H Hamid Taebi

                Do you want to show two bitmaps(two status) where you want to change this status when you click a button?then use of SetBitmap.(if isnt your answer can you more explain,please)


                WhiteSky


                H Offline
                H Offline
                harsh_2961
                wrote on last edited by
                #7

                Thanks whitesky its working with setbitmap:)

                Harsha

                H 1 Reply Last reply
                0
                • H harsh_2961

                  Thanks whitesky its working with setbitmap:)

                  Harsha

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

                  You're welcome ;)


                  WhiteSky


                  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