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. Article Writing
  4. causing a mouse drag programaticly

causing a mouse drag programaticly

Scheduled Pinned Locked Moved Article Writing
jsonhelpquestion
4 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.
  • S Offline
    S Offline
    SAK
    wrote on last edited by
    #1

    does anyone have an idea how I can cause a mouse drag programaticly. What api function could do this? Any help would be most appreciated. Thank you, SAK

    A 1 Reply Last reply
    0
    • S SAK

      does anyone have an idea how I can cause a mouse drag programaticly. What api function could do this? Any help would be most appreciated. Thank you, SAK

      A Offline
      A Offline
      Andres Manggini
      wrote on last edited by
      #2

      I think SetCursorPos will do the trick. You can find more information here: MSDN Library Platform SDK: Windows User Interface SetCursorPos Andres Manggini. Buenos Aires - Argentina.

      S 1 Reply Last reply
      0
      • A Andres Manggini

        I think SetCursorPos will do the trick. You can find more information here: MSDN Library Platform SDK: Windows User Interface SetCursorPos Andres Manggini. Buenos Aires - Argentina.

        S Offline
        S Offline
        SAK
        wrote on last edited by
        #3

        I am using the SetCursorPos but this only moves the cursor, but what I need is to do a drag operation. So I need to cause a click and have the mouse button pressed until the drag operation is complete. How is it possible to keep the mouse button down. Thanks

        A 1 Reply Last reply
        0
        • S SAK

          I am using the SetCursorPos but this only moves the cursor, but what I need is to do a drag operation. So I need to cause a click and have the mouse button pressed until the drag operation is complete. How is it possible to keep the mouse button down. Thanks

          A Offline
          A Offline
          Andres Manggini
          wrote on last edited by
          #4

          You are right.. I misread your message, thought you wanted to just move the pointer. I would try sending a message to the window directly, you should obtain the Window Handle and then send a couple of message, maybe a WM_LBUTTONDOWN and a WM_MOUSEMOVE, I'm not sure how this is going to interact with the messages that the actual mouse is generating, perhaps SetCapture can help here.. Andres. Buenos Aires - Argentina.

          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