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. Loading Bitmaps

Loading Bitmaps

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
3 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.
  • F Offline
    F Offline
    FieldHawk
    wrote on last edited by
    #1

    Hi Folks , i want to load and display bitmaps in my MFC(CView) derived class. i have tried quite a bit functions(LoadBitmap () etc..) but it does not work for me. plz help me in this regard thanx in advance

    D A 2 Replies Last reply
    0
    • F FieldHawk

      Hi Folks , i want to load and display bitmaps in my MFC(CView) derived class. i have tried quite a bit functions(LoadBitmap () etc..) but it does not work for me. plz help me in this regard thanx in advance

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

      FieldHawk wrote: but it does not work for me. Define "does not work." Are you getting compiler/linker error(s), run-time error(s), or does LoadBitmap() return an invalid handle.


      A rich person is not the one who has the most, but the one that needs the least.

      1 Reply Last reply
      0
      • F FieldHawk

        Hi Folks , i want to load and display bitmaps in my MFC(CView) derived class. i have tried quite a bit functions(LoadBitmap () etc..) but it does not work for me. plz help me in this regard thanx in advance

        A Offline
        A Offline
        abc876
        wrote on last edited by
        #3

        Here is a simple code to load and siplay any bitmap from resource file. d is a pointer to CDC , while IDB_BITMAP1 is name of BITMAP resource which u want to display.. //d is pointer to CDC CDC dc; CBitmap bitmap; bitmap.LoadBitmap(IDB_BITMAP1); dc.CreateCompatibleDC(d); d->SelectObject(&bitmap); d->BitBlt(0,0,100,100,&dc,0,0,SRCCOPY); Muhammad Shoaib Khan http://geocities.com/lansolution

        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