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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. GDI+ what happened to GetPixel() ?

GDI+ what happened to GetPixel() ?

Scheduled Pinned Locked Moved C / C++ / MFC
graphicsquestionwinformstutorial
1 Posts 1 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.
  • G Offline
    G Offline
    Greg Ellis
    wrote on last edited by
    #1

    I need to loop through each pixel in a "device context" in GDI+. In the old GDI I just did this: if(pDC->GetPixel(point) == crLineTwoColor) { ::SetCursor( AfxGetApp()->LoadStandardCursor( IDC_SIZEWE ) ); } but now with GDI+ I don't know how to check the "device context" pixel by pixel to check for a certain color. I check the documentation, but there is not function called GetPixel() in the Graphics class. I see there is a GetPixel() function in the Bitmap class, but I don't know how to put the contents of a device context into a Bitmap variable. How do I check the "device context" pixel by pixel to check for a certain color using GDI+? or How do I put a copy of what is on my device context in a Bitmap variable so I can use the GetPixel() function? P.S I know that it isn't called a device context anymore in the GDI+, but I don't know what else to call it. Thanks in Advance! Greg

    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