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. Graphics
  4. C++/MFC - Problem with GDI+ Bitmap::GetHBITMAP()

C++/MFC - Problem with GDI+ Bitmap::GetHBITMAP()

Scheduled Pinned Locked Moved Graphics
c++graphicsdotnetwinformshelp
22 Posts 3 Posters 58 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.
  • M Mark Salsbery

    PJ Arends wrote:

    As I doubt it is our fault I am going to go with the flawed theory.

    I agree :) Good workaround. All that code to do it kinda makes me feel like I'm not getting anything out of GDI+ though :rolleyes: I posted sample code on MS site as well just for the heck of it. I do think it's a bug though. Mark

    "Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot? Of course you don't, no one does. It never happens. It's a dumb question... skip it." (Rex Kramer "Airplane!")

    PJ ArendsP Offline
    PJ ArendsP Offline
    PJ Arends
    wrote on last edited by
    #13

    Mark Salsbery wrote:

    I posted sample code on MS site as well just for the heck of it.

    Good idea. Can you supply a link? I would like to follow that thread as well.


    You may be right
    I may be crazy
    -- Billy Joel --

    Within you lies the power for good, use it!!!

    Within you lies the power for good; Use it!

    M 2 Replies Last reply
    0
    • PJ ArendsP PJ Arends

      Mark Salsbery wrote:

      I posted sample code on MS site as well just for the heck of it.

      Good idea. Can you supply a link? I would like to follow that thread as well.


      You may be right
      I may be crazy
      -- Billy Joel --

      Within you lies the power for good, use it!!!

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

      The link[^] It hasn't generated much interest yet. Hopefully I used the most appropriate forum. There's so many I get bored half way through the list. :laugh:

      "Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot? Of course you don't, no one does. It never happens. It's a dumb question... skip it." (Rex Kramer "Airplane!")

      1 Reply Last reply
      0
      • PJ ArendsP PJ Arends

        Mark Salsbery wrote:

        I posted sample code on MS site as well just for the heck of it.

        Good idea. Can you supply a link? I would like to follow that thread as well.


        You may be right
        I may be crazy
        -- Billy Joel --

        Within you lies the power for good, use it!!!

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

        Ok that was the wrong place to post that question :rolleyes: I reposted here[^] And I thought there was alot of forums at the other one...

        "Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot? Of course you don't, no one does. It never happens. It's a dumb question... skip it." (Rex Kramer "Airplane!")

        PJ ArendsP 2 Replies Last reply
        0
        • M Mark Salsbery

          Ok that was the wrong place to post that question :rolleyes: I reposted here[^] And I thought there was alot of forums at the other one...

          "Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot? Of course you don't, no one does. It never happens. It's a dumb question... skip it." (Rex Kramer "Airplane!")

          PJ ArendsP Offline
          PJ ArendsP Offline
          PJ Arends
          wrote on last edited by
          #16

          Ok, thanks Mark. I will watch both those links and see what kind of answers come in. Maybe it is a known bug with a hotfix already available.


          You may be right
          I may be crazy
          -- Billy Joel --

          Within you lies the power for good, use it!!!

          Within you lies the power for good; Use it!

          1 Reply Last reply
          0
          • M Mark Salsbery

            Ok that was the wrong place to post that question :rolleyes: I reposted here[^] And I thought there was alot of forums at the other one...

            "Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot? Of course you don't, no one does. It never happens. It's a dumb question... skip it." (Rex Kramer "Airplane!")

            PJ ArendsP Offline
            PJ ArendsP Offline
            PJ Arends
            wrote on last edited by
            #17

            Here[^] is an MSDN forum entry that talks about a blue "halo" around images and an admitted bug in the GetHBITMAP function. It is dated from May 2005 so one would figure there would be a fix by now. I will keep looking.


            You may be right
            I may be crazy
            -- Billy Joel --

            Within you lies the power for good, use it!!!

            Within you lies the power for good; Use it!

            M 2 Replies Last reply
            0
            • PJ ArendsP PJ Arends

              Here[^] is an MSDN forum entry that talks about a blue "halo" around images and an admitted bug in the GetHBITMAP function. It is dated from May 2005 so one would figure there would be a fix by now. I will keep looking.


              You may be right
              I may be crazy
              -- Billy Joel --

              Within you lies the power for good, use it!!!

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

              Thanks for the link! I would guess it's a pretty simple bug to fix - maybe it doesn't get reported. It may not be often that we (programmers) need a HBITMAP from a Gdiplus::Bitmap. Still, I never know - I may want to do it tomorrow and it's not going to work :mad: One reply so far on the MS GDI board but it wasn't useful. Thanks for the update! Mark

              "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

              1 Reply Last reply
              0
              • PJ ArendsP PJ Arends

                Here[^] is an MSDN forum entry that talks about a blue "halo" around images and an admitted bug in the GetHBITMAP function. It is dated from May 2005 so one would figure there would be a fix by now. I will keep looking.


                You may be right
                I may be crazy
                -- Billy Joel --

                Within you lies the power for good, use it!!!

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

                Here[^] is some code someone did to fix the problem. Search for "FixedGdipCreateHBITMAPFromBitmap" on the page to find it :) Not necessarily useful - just FYI. Mark

                "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

                PJ ArendsP 1 Reply Last reply
                0
                • M Mark Salsbery

                  Here[^] is some code someone did to fix the problem. Search for "FixedGdipCreateHBITMAPFromBitmap" on the page to find it :) Not necessarily useful - just FYI. Mark

                  "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

                  PJ ArendsP Offline
                  PJ ArendsP Offline
                  PJ Arends
                  wrote on last edited by
                  #20

                  http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.windowsforms/topic21736.aspx[^]


                  You may be right
                  I may be crazy
                  -- Billy Joel --

                  Within you lies the power for good, use it!!!

                  Within you lies the power for good; Use it!

                  M 1 Reply Last reply
                  0
                  • PJ ArendsP PJ Arends

                    http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.windowsforms/topic21736.aspx[^]


                    You may be right
                    I may be crazy
                    -- Billy Joel --

                    Within you lies the power for good, use it!!!

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

                    :laugh::laugh: Thank you! I am SO glad someone else argued with him - I know that's where it was going in my thread on MSDN (with the same guy!). Anyway, did you draw any conclusion from all that? Mark

                    "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

                    PJ ArendsP 1 Reply Last reply
                    0
                    • M Mark Salsbery

                      :laugh::laugh: Thank you! I am SO glad someone else argued with him - I know that's where it was going in my thread on MSDN (with the same guy!). Anyway, did you draw any conclusion from all that? Mark

                      "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

                      PJ ArendsP Offline
                      PJ ArendsP Offline
                      PJ Arends
                      wrote on last edited by
                      #22

                      Mark Salsbery wrote:

                      Anyway, did you draw any conclusion from all that?

                      Yeah, that that guy is extremely stubborn:doh: If he is right, and the result we are seeing is the expected result, then the designers of GetHBITMAP should be shot as it makes absolute no sense.:sigh: I think I will just use my workaround as all I have been able to find on the subject is some people complaining about the bug, but no one being able to point to a hotfix or easy to implement solution (hooking the Gdiplus dll is not an easy solution). I will continue to watch these threads but I will not hold my breath waitng for a solution.


                      You may be right
                      I may be crazy
                      -- Billy Joel --

                      Within you lies the power for good, use it!!!

                      Within you lies the power for good; Use it!

                      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