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. Picture Control to load BMP

Picture Control to load BMP

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphics
3 Posts 2 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.
  • G Offline
    G Offline
    goodoljosh1980
    wrote on last edited by
    #1

    What am I missing to show a BMP correclty using the CStatic variable assigned to a Picture Control through MFC... BITMAP test; CBitmap m_bitmap; HBITMAP m_hbitmap; m_bitmap.LoadBitmap(IDB_BITMAP1); m_bitmap.GetBitmap(&test); m_hbitmap = m_bitmap.operator HBITMAP(); m_S1S2_Arrow.MoveWindow(40,50,test.bmWidth,test.bmHeight,1); m_S1S2_Arrow.SetBitmap(m_hbitmap); m_S1S2.Arrow.ShowWindow(1); I would presume that the BMP would be loaded in and shown at this point, but I get nothing back. Any ideas would be great. Thanks so much.

    D 1 Reply Last reply
    0
    • G goodoljosh1980

      What am I missing to show a BMP correclty using the CStatic variable assigned to a Picture Control through MFC... BITMAP test; CBitmap m_bitmap; HBITMAP m_hbitmap; m_bitmap.LoadBitmap(IDB_BITMAP1); m_bitmap.GetBitmap(&test); m_hbitmap = m_bitmap.operator HBITMAP(); m_S1S2_Arrow.MoveWindow(40,50,test.bmWidth,test.bmHeight,1); m_S1S2_Arrow.SetBitmap(m_hbitmap); m_S1S2.Arrow.ShowWindow(1); I would presume that the BMP would be loaded in and shown at this point, but I get nothing back. Any ideas would be great. Thanks so much.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Does this help?


      "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

      "Judge not by the eye but by the heart." - Native American Proverb

      G 1 Reply Last reply
      0
      • D David Crow

        Does this help?


        "Money talks. When my money starts to talk, I get a bill to shut it up." - Frank

        "Judge not by the eye but by the heart." - Native American Proverb

        G Offline
        G Offline
        goodoljosh1980
        wrote on last edited by
        #3

        I am not trying to draw a button, I am simply trying to load a bitmap on a screen to show them things. Instead of having 20 variables each with only 1 BMP that it shows, I want to be able to have 3 or 4 and have them be able to switch to different BMPs to load up. However, when I do that and call the ShowWindow(1) function, nothing happens.

        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