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. How can I know that the mouse is/is not over my control

How can I know that the mouse is/is not over my control

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

    I have a custom control, and the user can click and move an item on my control, but if the mouse go outside the control... I can't do anything. How can we control that. (my class is derived from cwnd) Remi Morin Rmorin@Operamail.com Remi.Morin@Lyrtech.com

    L 1 Reply Last reply
    0
    • R Remi Morin

      I have a custom control, and the user can click and move an item on my control, but if the mouse go outside the control... I can't do anything. How can we control that. (my class is derived from cwnd) Remi Morin Rmorin@Operamail.com Remi.Morin@Lyrtech.com

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      check for WM_NCMOUSEMOVE; (non-client mousemove messages) or, you can call SetCapture to cage the beast to your control. You can also use GetCapture and ReleaseCapture to ensure that you recieve all of the mouse messages, if you are the greedy type. :suss: Darin Rousseau http://www.rinlex.com/fssi/development/ darin@rinlex.com

      R 1 Reply Last reply
      0
      • L Lost User

        check for WM_NCMOUSEMOVE; (non-client mousemove messages) or, you can call SetCapture to cage the beast to your control. You can also use GetCapture and ReleaseCapture to ensure that you recieve all of the mouse messages, if you are the greedy type. :suss: Darin Rousseau http://www.rinlex.com/fssi/development/ darin@rinlex.com

        R Offline
        R Offline
        Remi Morin
        wrote on last edited by
        #3

        Thanks!!! I've used the SetCapture and that's it! Very easy to play whit this is a miracle to my problem.... I know I look like a newbies but it's a little bit true whit MFC... Remi Morin Rmorin@Operamail.com Remi.Morin@Lyrtech.com N'oubliez pas que l'enfer aussi a ses miracles

        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