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. Odd error when using GetDIBits

Odd error when using GetDIBits

Scheduled Pinned Locked Moved C / C++ / MFC
graphicshelpquestion
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.
  • T Offline
    T Offline
    TheDelChop
    wrote on last edited by
    #1

    Guys, I am trying to make a call to retrieve the bitmap information from a drawing context. When calling GetDIBits, it returns NULL and when I call GetLastError() it gives me ERROR_FILE_NOT_FOUND. Could anybody shed some light on what exactly it is that Windows is trying to tell me?

    M M 2 Replies Last reply
    0
    • T TheDelChop

      Guys, I am trying to make a call to retrieve the bitmap information from a drawing context. When calling GetDIBits, it returns NULL and when I call GetLastError() it gives me ERROR_FILE_NOT_FOUND. Could anybody shed some light on what exactly it is that Windows is trying to tell me?

      M Offline
      M Offline
      Moak
      wrote on last edited by
      #2

      According to MSDN [^] this could also mean that your call was successful and "the return value is the number of scan lines copied from the bitmap". Perhaps you can post a code snippet?

      1 Reply Last reply
      0
      • T TheDelChop

        Guys, I am trying to make a call to retrieve the bitmap information from a drawing context. When calling GetDIBits, it returns NULL and when I call GetLastError() it gives me ERROR_FILE_NOT_FOUND. Could anybody shed some light on what exactly it is that Windows is trying to tell me?

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        To add to Moaks reply... You're passing NULL for "LPVOID lpvBits" parameter, correct? If so, have you initialized the struct pointed to by the "LPBITMAPINFO lpbi" parameter properly? Mark

        "Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

        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