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 load a jpg/bmp image ?

how to load a jpg/bmp image ?

Scheduled Pinned Locked Moved C / C++ / MFC
graphicshelptutorialquestion
2 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.
  • D Offline
    D Offline
    djghazi
    wrote on last edited by
    #1

    hi how to load a jpg/bmp image in an sdi application as the background graphics.... help help help me.... :(( and yah how u can show ur own graphics instead of titlebar....:) plz help and answer as soon as possible happy programming u all regards Nauman Ghazi Bahria University

    B 1 Reply Last reply
    0
    • D djghazi

      hi how to load a jpg/bmp image in an sdi application as the background graphics.... help help help me.... :(( and yah how u can show ur own graphics instead of titlebar....:) plz help and answer as soon as possible happy programming u all regards Nauman Ghazi Bahria University

      B Offline
      B Offline
      balcn
      wrote on last edited by
      #2

      The following example code can be used for loading a BMP file image in any vc++ application. HBITMAP hbitmap; hbitmap = (HBITMAP)LoadImage(NULL,"C:\\house.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE); HDC hmemdc; hmemdc = CreateCompatibleDC(pDC->m_hdc); SelectObject(hmemdc,hbitmap); BitBlt(pDC->m_hdc,0,0,image_width,image_height,hmemdc,0,0,SRCCOPY); For viewing as a background image in an SDI application the above code can be used inside the OnDraw(CDC *pDC) method of view class. For loading a JPEG file you can use external JPEG libraries such as the IJL15.DLL which is freely available. R.Balachandran

      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