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. load a bitmap from bmp file at run time

load a bitmap from bmp file at run time

Scheduled Pinned Locked Moved C / C++ / MFC
graphics
14 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.
  • V Viorel

    ::LoadBitmap and optional CBitmap::FromHandle can help.

    T Offline
    T Offline
    ThatsAlok
    wrote on last edited by
    #4

    Viorel. wrote:

    ::LoadBitmap and optional CBitmap::FromHandle can help.

    you can't load Image from File using these function!

    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

    cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

    V 1 Reply Last reply
    0
    • A anilksingh

      How load a bitmap from bmp file at run time

      S Offline
      S Offline
      sujtha
      wrote on last edited by
      #5

      LoadImage(NULL,szFilename, IMAGE_BITMAP,0,0, LR_LOADFROMFILE|LR_CREATEDIBSECTION);

      1 Reply Last reply
      0
      • A anilksingh

        How load a bitmap from bmp file at run time

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

        (1) CImage m_Image; m_Image.Load(filename); ------------------------- (2) CBitmap m_Bit; m_Bit.Attach((HBITMAP)::LoadImage(AfxGetResourceHandle(), filename,IMAGE_BITMAP,0, 0,LR_DEFAULTCOLOR |LR_LOADFROMFILE));_**


        **_

        whitesky


        1 Reply Last reply
        0
        • V Viorel

          ::LoadBitmap and optional CBitmap::FromHandle can help.

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

          but LoadBitmap(bitmap resource);not file_**


          **_

          whitesky


          V T 2 Replies Last reply
          0
          • T ThatsAlok

            Viorel. wrote:

            ::LoadBitmap and optional CBitmap::FromHandle can help.

            you can't load Image from File using these function!

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

            cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

            V Offline
            V Offline
            Viorel
            wrote on last edited by
            #8

            You are right. The image can be loaded from separate file using ::LoadImage function with LR_LOADFROMFILE flag, as was answered by sujtha.

            1 Reply Last reply
            0
            • H Hamid Taebi

              but LoadBitmap(bitmap resource);not file_**


              **_

              whitesky


              V Offline
              V Offline
              Viorel
              wrote on last edited by
              #9

              You are right. The image can be loaded from separate file using ::LoadImage function with LR_LOADFROMFILE flag, as was answered by sujtha.

              T 1 Reply Last reply
              0
              • V Viorel

                You are right. The image can be loaded from separate file using ::LoadImage function with LR_LOADFROMFILE flag, as was answered by sujtha.

                T Offline
                T Offline
                ThatsAlok
                wrote on last edited by
                #10

                Viorel. wrote:

                You are right. The image can be loaded from separate file using ::LoadImage function with LR_LOADFROMFILE flag, as was answered by sujtha.

                Isn't i answered before Ms Sujtha ?

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                V 1 Reply Last reply
                0
                • H Hamid Taebi

                  but LoadBitmap(bitmap resource);not file_**


                  **_

                  whitesky


                  T Offline
                  T Offline
                  ThatsAlok
                  wrote on last edited by
                  #11

                  WhiteSky wrote:

                  ut LoadBitmap(bitmap resource);not file

                  After long time i win the Leg Race:)

                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                  cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                  H 1 Reply Last reply
                  0
                  • T ThatsAlok

                    Viorel. wrote:

                    You are right. The image can be loaded from separate file using ::LoadImage function with LR_LOADFROMFILE flag, as was answered by sujtha.

                    Isn't i answered before Ms Sujtha ?

                    "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                    cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                    V Offline
                    V Offline
                    Viorel
                    wrote on last edited by
                    #12

                    ThatsAlok wrote:

                    Isn't i answered before Ms Sujtha ?

                    Yes, I missed your message, sorry.

                    1 Reply Last reply
                    0
                    • T ThatsAlok

                      WhiteSky wrote:

                      ut LoadBitmap(bitmap resource);not file

                      After long time i win the Leg Race:)

                      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                      cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

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

                      Hi ThatsAlok, how are you,you are absent here !? i think now you are very fast man not me and one thing where i write ut i write but :-D_**


                      **_

                      whitesky


                      T 1 Reply Last reply
                      0
                      • H Hamid Taebi

                        Hi ThatsAlok, how are you,you are absent here !? i think now you are very fast man not me and one thing where i write ut i write but :-D_**


                        **_

                        whitesky


                        T Offline
                        T Offline
                        ThatsAlok
                        wrote on last edited by
                        #14

                        WhiteSky wrote:

                        i think now you are very fast man not me and one thing where i write ut i write but

                        ;P

                        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                        cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                        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