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. Mouse Action

Mouse Action

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
4 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.
  • K Offline
    K Offline
    Ken Mazaika
    wrote on last edited by
    #1

    Does anyone know how to get the position of the mouse with regard to the sceen instead of the application? For example if the window was located in the middle of the window and the cursor was over the upper left corner i would like to get something like (250, 250) instead of (0,0). Any ideas?

    M RaviBeeR 2 Replies Last reply
    0
    • K Ken Mazaika

      Does anyone know how to get the position of the mouse with regard to the sceen instead of the application? For example if the window was located in the middle of the window and the cursor was over the upper left corner i would like to get something like (250, 250) instead of (0,0). Any ideas?

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      have a look at ClientToScreen .


      Maximilien Lincourt Your Head A Splode - Strong Bad

      K 1 Reply Last reply
      0
      • M Maximilien

        have a look at ClientToScreen .


        Maximilien Lincourt Your Head A Splode - Strong Bad

        K Offline
        K Offline
        Ken Mazaika
        wrote on last edited by
        #3

        Awesome, thanks a bunch....

        1 Reply Last reply
        0
        • K Ken Mazaika

          Does anyone know how to get the position of the mouse with regard to the sceen instead of the application? For example if the window was located in the middle of the window and the cursor was over the upper left corner i would like to get something like (250, 250) instead of (0,0). Any ideas?

          RaviBeeR Offline
          RaviBeeR Offline
          RaviBee
          wrote on last edited by
          #4

          GetCursorPos() always returns the mouse position in screen coordinates. /ravi My new year's resolution: 2048 x 1536 Home | Articles | Freeware | Music ravib@ravib.com

          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