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 bitmaps dynamically

Load bitmaps dynamically

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphicstutorial
5 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.
  • K Offline
    K Offline
    kiranin
    wrote on last edited by
    #1

    How to load bitmpas dynamically? When i directly loaded into resources(IDB_BITMPA) my exe is occupying more size. Instead of that how can i load at run time from bitmap images (res\image.bmp)

    C K J H 4 Replies Last reply
    0
    • K kiranin

      How to load bitmpas dynamically? When i directly loaded into resources(IDB_BITMPA) my exe is occupying more size. Instead of that how can i load at run time from bitmap images (res\image.bmp)

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      If you're using Win32 API, you may use LoadImage [^], for instance

      HANDLE hMyBmp = LoadImage(NULL, _T("res\\image.bmp"), IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);

      On the other hand, if you're using MFC/ATL, have a look at CImage class documentation [^], the Load method looks promising. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      1 Reply Last reply
      0
      • K kiranin

        How to load bitmpas dynamically? When i directly loaded into resources(IDB_BITMPA) my exe is occupying more size. Instead of that how can i load at run time from bitmap images (res\image.bmp)

        K Offline
        K Offline
        KarstenK
        wrote on last edited by
        #3

        There is one of the GREATEST article in Code Project about images. :rolleyes: There is really a lot stuff in it: http://www.codeproject.com/KB/graphics/cximage.aspx[^]

        Greetings from Germany

        1 Reply Last reply
        0
        • K kiranin

          How to load bitmpas dynamically? When i directly loaded into resources(IDB_BITMPA) my exe is occupying more size. Instead of that how can i load at run time from bitmap images (res\image.bmp)

          J Offline
          J Offline
          Jijo Raj
          wrote on last edited by
          #4

          Have a look at these simple tutorials, about how to load and display bitmaps from file. http://www.functionx.com/visualc/bitmaps/DisplayFromFile.htm[^] http://www.functionx.com/visualc/views/DisplayBitmap.htm[^] Regards, Jijo.

          _____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

          1 Reply Last reply
          0
          • K kiranin

            How to load bitmpas dynamically? When i directly loaded into resources(IDB_BITMPA) my exe is occupying more size. Instead of that how can i load at run time from bitmap images (res\image.bmp)

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

            You can use of CImage class: #include AtlImage.h CImage m; m.Load(_T("")); .... ...

            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