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. Touch down event with hook(WH_MOUSE_LL) and WM_LBUTTON

Touch down event with hook(WH_MOUSE_LL) and WM_LBUTTON

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
6 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.
  • C Offline
    C Offline
    cedricvictor
    wrote on last edited by
    #1

    Dear all: I want to implement a application, when I touch the pannel, the application will play sound globally. I use hook(WH_MOUSE_LL) and WM_LBUTTONDOWN to process the touch and PlaySound to play wav. The Question is : when I touch the pannel, it does not play. if I touch and leave fast, it will play. How do I solve this problem? Thank for your help .Victor

    L 2 Replies Last reply
    0
    • C cedricvictor

      Dear all: I want to implement a application, when I touch the pannel, the application will play sound globally. I use hook(WH_MOUSE_LL) and WM_LBUTTONDOWN to process the touch and PlaySound to play wav. The Question is : when I touch the pannel, it does not play. if I touch and leave fast, it will play. How do I solve this problem? Thank for your help .Victor

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

      Hi, Any particular reason why you are not handling the WM_TOUCH message[^]? Getting Started with Windows Touch Messages[^] Best Wishes, -David Delaune

      C 1 Reply Last reply
      0
      • L Lost User

        Hi, Any particular reason why you are not handling the WM_TOUCH message[^]? Getting Started with Windows Touch Messages[^] Best Wishes, -David Delaune

        C Offline
        C Offline
        cedricvictor
        wrote on last edited by
        #3

        Dear Randor: My application function must be have: 1.When I touch anywhere, even not on my app(ex:desktop, other application, extc...), it will play sound. so I must be use hook, I did not find anything about hook with touch. Does anything else to implement this application Thank for your help, Victor

        L 1 Reply Last reply
        0
        • C cedricvictor

          Dear Randor: My application function must be have: 1.When I touch anywhere, even not on my app(ex:desktop, other application, extc...), it will play sound. so I must be use hook, I did not find anything about hook with touch. Does anything else to implement this application Thank for your help, Victor

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

          Hi,

          cedricvictor wrote:

          Does anything else to implement this applicati

          Microsoft recommends that you use a HID filter driver for something like this. You might be able to hack something together with a WH_GETMESSAGE hook. I will now go and answer your original question. Best Wishes, -David Delaune

          1 Reply Last reply
          0
          • C cedricvictor

            Dear all: I want to implement a application, when I touch the pannel, the application will play sound globally. I use hook(WH_MOUSE_LL) and WM_LBUTTONDOWN to process the touch and PlaySound to play wav. The Question is : when I touch the pannel, it does not play. if I touch and leave fast, it will play. How do I solve this problem? Thank for your help .Victor

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

            Hi,

            cedricvictor wrote:

            when I touch the pannel, it does not play. if I touch and leave fast, it will play.

            When you use the touch screen and 'HOLD down' the touch driver may interpret this as a right click. If the application did not register itself as being 'compatible with touch' a WM_RBUTTONDOWN followed by a WM_RBUTTONUP would be injected into the input stream. Best Wishes, -David Delaune

            C 1 Reply Last reply
            0
            • L Lost User

              Hi,

              cedricvictor wrote:

              when I touch the pannel, it does not play. if I touch and leave fast, it will play.

              When you use the touch screen and 'HOLD down' the touch driver may interpret this as a right click. If the application did not register itself as being 'compatible with touch' a WM_RBUTTONDOWN followed by a WM_RBUTTONUP would be injected into the input stream. Best Wishes, -David Delaune

              C Offline
              C Offline
              cedricvictor
              wrote on last edited by
              #6

              Dear Randor: I think you are right. It is different between touch and mouse. when left mouse button down, it will play sound. when I touch the panel, and leave fast, it will play or touch the panel, and then move my finger on panel, it will play sound, too. Thank for your help, Victor.

              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