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. problem with mouse_event()

problem with mouse_event()

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++delphiquestionannouncement
5 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.
  • V Offline
    V Offline
    V_shr
    wrote on last edited by
    #1

    Hello

    mouse_event(MOUSEEVENTF_RIGHTUP,x,y,0,GetMessageExtraInfo());

    it works! But with MOUSEEVENTF_LEFTUP and MOUSEEVENTF_ABSOLUTE nothing happens! I think that the fanction has a problem . I write my program in Borland C++Builder version 6. can you help me? thanks

    J 1 Reply Last reply
    0
    • V V_shr

      Hello

      mouse_event(MOUSEEVENTF_RIGHTUP,x,y,0,GetMessageExtraInfo());

      it works! But with MOUSEEVENTF_LEFTUP and MOUSEEVENTF_ABSOLUTE nothing happens! I think that the fanction has a problem . I write my program in Borland C++Builder version 6. can you help me? thanks

      J Offline
      J Offline
      Justin Tay
      wrote on last edited by
      #2

      Did you do MOUSEEVENTF_LEFTDOWN before MOUSEEVENTF_LEFTUP?

      V 1 Reply Last reply
      0
      • J Justin Tay

        Did you do MOUSEEVENTF_LEFTDOWN before MOUSEEVENTF_LEFTUP?

        V Offline
        V Offline
        V_shr
        wrote on last edited by
        #3

        No , but I think that isn't important. because when I use MOUSEEVENTF_RIGHTUP I dont use MOUSEEVENTF_RIGHTDOWN before it but it works . thanks

        J 1 Reply Last reply
        0
        • V V_shr

          No , but I think that isn't important. because when I use MOUSEEVENTF_RIGHTUP I dont use MOUSEEVENTF_RIGHTDOWN before it but it works . thanks

          J Offline
          J Offline
          Justin Tay
          wrote on last edited by
          #4

          That would depend on whatever application that is the receipient of the mouse clicks, and I would imagine that a programmer won't think of a situation in which the mouse button can go up without going down first. Just because it "works" in certain cases doesn't mean it's correct. If you had tried simulating keyboard input with keys going up without coming down first you get fantastic results. Have your taskbar be on the bottom of your primary monitor and visible and run this snippet. Does the start menu pop up? Works for me...

          mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, 0, 65535, 0, GetMessageExtraInfo());
          mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0 ,0,GetMessageExtraInfo());
          mouse_event(MOUSEEVENTF_LEFTUP, 0, 0 ,0,GetMessageExtraInfo());

          V 1 Reply Last reply
          0
          • J Justin Tay

            That would depend on whatever application that is the receipient of the mouse clicks, and I would imagine that a programmer won't think of a situation in which the mouse button can go up without going down first. Just because it "works" in certain cases doesn't mean it's correct. If you had tried simulating keyboard input with keys going up without coming down first you get fantastic results. Have your taskbar be on the bottom of your primary monitor and visible and run this snippet. Does the start menu pop up? Works for me...

            mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, 0, 65535, 0, GetMessageExtraInfo());
            mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0 ,0,GetMessageExtraInfo());
            mouse_event(MOUSEEVENTF_LEFTUP, 0, 0 ,0,GetMessageExtraInfo());

            V Offline
            V Offline
            V_shr
            wrote on last edited by
            #5

            YES,it is correct thanks

            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