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. Other Discussions
  3. IT & Infrastructure
  4. Need help....Mouse Hook

Need help....Mouse Hook

Scheduled Pinned Locked Moved IT & Infrastructure
helptutorialquestion
2 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
    Alek
    wrote on last edited by
    #1

    I need to disable the original mouse behavior and let it to do some action that I want it to do. For example, when user clicks right mouse button, I want it to simulate a 'Enter' key but not to show a popup menu. I use SetWindowsHookEx(WH_GETMESSAGE,....) function to get the mouse click message like WM_RBUTTONDOWN, WM_MBUTTONUP...etc. and then return false to prevent the message into the hook chain again. It really works well. But under Miscrosoft Office(Word, Excel..), it always run 6 times. For example, if I simulate the right mouse button to 'Backspace' key, everytime I click right mouse button, it runs 6 times. I think it's not good, it should only run once, right??? Could anyone help me to solve this bug??? Thanks a lot. :confused:

    B 1 Reply Last reply
    0
    • A Alek

      I need to disable the original mouse behavior and let it to do some action that I want it to do. For example, when user clicks right mouse button, I want it to simulate a 'Enter' key but not to show a popup menu. I use SetWindowsHookEx(WH_GETMESSAGE,....) function to get the mouse click message like WM_RBUTTONDOWN, WM_MBUTTONUP...etc. and then return false to prevent the message into the hook chain again. It really works well. But under Miscrosoft Office(Word, Excel..), it always run 6 times. For example, if I simulate the right mouse button to 'Backspace' key, everytime I click right mouse button, it runs 6 times. I think it's not good, it should only run once, right??? Could anyone help me to solve this bug??? Thanks a lot. :confused:

      B Offline
      B Offline
      Brian Delahunty
      wrote on last edited by
      #2

      If you post this in the Visual C++ Forum you'll probably get a decent answer :-)


      "When a friend hurts us, we should write it down in the sand, where the winds of forgiveness get in charge of erasing it away, and when something great happens, we should engrave it in the stone of the memory of the heart, where no wind can erase it" Nish on life [methinks]

      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