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. Win32 Global hooks and mouse overs....

Win32 Global hooks and mouse overs....

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpvisual-studiohelp
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.
  • M Offline
    M Offline
    Mr Jen Withers
    wrote on last edited by
    #1

    Hey there, ive got a feeling there wont be an easy answer / solution to this question but if you dont ask you dont get! I was wondering if there is any way to globally capture mouse overs in windows. Iam not sure if the way ive described this will make much sense to anyone so a quick usecase might help. When a user opens up the start menu and highlights 'my documents', the background colour changes to blue to show you have your mouse hovered over it. Can this event possibly be captured? I imagine capturing mouse overs on the start menu will be different to say catching a highlighted menu option in visual studio. But id really like to know if there is any way of globally detecting when hovering the mouse "highlights" something on the screen in relation. Any help guys? Thanks in advance

    A 1 Reply Last reply
    0
    • M Mr Jen Withers

      Hey there, ive got a feeling there wont be an easy answer / solution to this question but if you dont ask you dont get! I was wondering if there is any way to globally capture mouse overs in windows. Iam not sure if the way ive described this will make much sense to anyone so a quick usecase might help. When a user opens up the start menu and highlights 'my documents', the background colour changes to blue to show you have your mouse hovered over it. Can this event possibly be captured? I imagine capturing mouse overs on the start menu will be different to say catching a highlighted menu option in visual studio. But id really like to know if there is any way of globally detecting when hovering the mouse "highlights" something on the screen in relation. Any help guys? Thanks in advance

      A Offline
      A Offline
      AlexAbramov
      wrote on last edited by
      #2

      Have you thought about getting into the address space of the process that creates the window(s) and subclassing the particular window in order to capture the relevant messages?

      M 1 Reply Last reply
      0
      • A AlexAbramov

        Have you thought about getting into the address space of the process that creates the window(s) and subclassing the particular window in order to capture the relevant messages?

        M Offline
        M Offline
        Mr Jen Withers
        wrote on last edited by
        #3

        I had looked into this and it doesnt seem to hard to do providing I learn enough about the win32 API. However the part which seems to vary between applications is capturing the relevant messages. Ive used winspector to look at messages being sent back & forth between windows and there does appear to be any pattern to what happens when something under the cursor changes due to a 'mouse over'. I noticed the startbar (dv3controlhost , syslistview32) calls wm_ncpaint followed by wm_erasebackground when I move between items and the mouse overs activate but this doesnt seem consistance with other applications ive looked at like Adobe Audition. But ive notice Adobde Audition uses alot of custom classes in its contruction......

        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