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. Color of a pixel set by coordinates

Color of a pixel set by coordinates

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • A Offline
    A Offline
    Archigal
    wrote on last edited by
    #1

    Hello I have a HWND of a window and the coordinates of the pixel. How can I get a current color of this pixel? The window is from another application. Thank you in advance

    Z 1 Reply Last reply
    0
    • A Archigal

      Hello I have a HWND of a window and the coordinates of the pixel. How can I get a current color of this pixel? The window is from another application. Thank you in advance

      Z Offline
      Z Offline
      zeki yugnak
      wrote on last edited by
      #2

      hi.. if you know that coordinate's of pixel,you can use this function.

      COLORREF GetPixel(
      int x,
      int y
      )

      like this..

      COLORREF color;
      color=GetPixel(10,10);
      int red=GetRValue(color);
      int blue=GetBValue(color);
      int green=GetGValue(color);

      Good Work...

      A 1 Reply Last reply
      0
      • Z zeki yugnak

        hi.. if you know that coordinate's of pixel,you can use this function.

        COLORREF GetPixel(
        int x,
        int y
        )

        like this..

        COLORREF color;
        color=GetPixel(10,10);
        int red=GetRValue(color);
        int blue=GetBValue(color);
        int green=GetGValue(color);

        Good Work...

        A Offline
        A Offline
        Archigal
        wrote on last edited by
        #3

        Thanks It was the first useful reply on my questions on this forum. :confused: Thanks again

        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