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. bmfh.bfType != 0x4d42

bmfh.bfType != 0x4d42

Scheduled Pinned Locked Moved C / C++ / MFC
asp-netquestion
4 Posts 4 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
    keyto
    wrote on last edited by
    #1

    Here bmfh is an object of BITMAPFILEHEADER and I am not sure to achieve the core meaning of the statement below can U explain me ? if(bmfh.bfType != 0x4d42) { throw CDibException(CDibException::enm_file_read_filed, "BMPƒtƒ@ƒCƒ‹‚ł͂ ‚è‚Ü‚¹‚ñ"); }

    T P C 3 Replies Last reply
    0
    • K keyto

      Here bmfh is an object of BITMAPFILEHEADER and I am not sure to achieve the core meaning of the statement below can U explain me ? if(bmfh.bfType != 0x4d42) { throw CDibException(CDibException::enm_file_read_filed, "BMPƒtƒ@ƒCƒ‹‚ł͂ ‚è‚Ü‚¹‚ñ"); }

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      keyto wrote:

      can U explain me ?

      can't you follow the posting guidelines ?[^] :zzz: for your question, it just tests if the bfType member of your BITMAPFILEHEADER variable is different of the hexadecimal value 0x4d42. if you can't understand this, maybe you should consider buy a book on C and lear about structs...


      [VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]

      1 Reply Last reply
      0
      • K keyto

        Here bmfh is an object of BITMAPFILEHEADER and I am not sure to achieve the core meaning of the statement below can U explain me ? if(bmfh.bfType != 0x4d42) { throw CDibException(CDibException::enm_file_read_filed, "BMPƒtƒ@ƒCƒ‹‚ł͂ ‚è‚Ü‚¹‚ñ"); }

        P Offline
        P Offline
        Paresh Chitte
        wrote on last edited by
        #3

        Hi, MSDN[^] says that bfType must be BM. 0x4d - M 0x42 - B Regards, Paresh.

        1 Reply Last reply
        0
        • K keyto

          Here bmfh is an object of BITMAPFILEHEADER and I am not sure to achieve the core meaning of the statement below can U explain me ? if(bmfh.bfType != 0x4d42) { throw CDibException(CDibException::enm_file_read_filed, "BMPƒtƒ@ƒCƒ‹‚ł͂ ‚è‚Ü‚¹‚ñ"); }

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

          A consistence check for the bitmap file. Every bitmap file must contain the characters 'B' (0x42) and 'M' (0x4d) at the very beginning.

          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.

          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