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. Which API's do i need to get the hWnd of the control under the cursor?

Which API's do i need to get the hWnd of the control under the cursor?

Scheduled Pinned Locked Moved C / C++ / MFC
jsonquestion
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.
  • R Offline
    R Offline
    Redeemer dk
    wrote on last edited by
    #1

    I'm making a program where i need the hWnd of the control that is currently under the cursor, but i'm in doubt of which API's i should use. I've tried checking around but i can't seem to find the answer. Thanks in advance

    PJ ArendsP J 2 Replies Last reply
    0
    • R Redeemer dk

      I'm making a program where i need the hWnd of the control that is currently under the cursor, but i'm in doubt of which API's i should use. I've tried checking around but i can't seem to find the answer. Thanks in advance

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

      WindowFromPoint() or possibly ChildWindowFromPoint()


      [

      ](http://www.canucks.com)Sonork 100.11743 Chicken Little "You're obviously a superstar." - Christian Graus about me - 12 Feb '03 Within you lies the power for good - Use it!

      Within you lies the power for good; Use it!

      1 Reply Last reply
      0
      • R Redeemer dk

        I'm making a program where i need the hWnd of the control that is currently under the cursor, but i'm in doubt of which API's i should use. I've tried checking around but i can't seem to find the answer. Thanks in advance

        J Offline
        J Offline
        John R Shaw
        wrote on last edited by
        #3

        You might want search MSDN there is an old sample program on using DIBs. What the program does is allow you to move the cursor over a window a capture it to a DIB. If you search for a screen/windows capture program here or on the web you should be able to find additional examples. Trust in the code Luke. Yea right!

        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