Fire MouseUp event in browser when click started outside of browser

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NewWebDev
    New Member
    • Jan 2011
    • 4

    #1

    Fire MouseUp event in browser when click started outside of browser

    Hi!

    I have an HTML page embedded into a windows 32 app (being displayed via a Web Browser control). I want to be able to drag from a Win32 object and drop into the web browser.

    I press the mouse button down in the Win32 object...and once I start dragging into the browser, I fire off some javascript to start a drag operation similar to as if I started in the browser with the click.

    The mouse move event is triggered in the browser...but when I let go of the mouse button, the mouseup event doesn't trigger. I have tried using setCapture here but that hasn't helped unfortunately.

    Any pointers or ideas?

    Thanks!
  • NewWebDev
    New Member
    • Jan 2011
    • 4

    #2
    Still no luck. Using Spy++, I can confirm that the WM_LBUTTONUP message is sent to the web browser control. Unlike when I do a regular click in the web browser control, I don't see a WM_MOUSEACTIVAT E call sent there so perhaps that is it?

    Comment

    • NewWebDev
      New Member
      • Jan 2011
      • 4

      #3
      I sort of got this working. I had to send a WM_LBUTTONDOWN message to the 'Internet Explorer_Server ' window of the Web Browser Control.

      Is there an easy way to get this window or an easier way to simulate the LBUTTONDOWN message here so IE will fire an event on the subsequent LBUTTONUP message it receives?

      Comment

      • Samishii23
        New Member
        • Sep 2009
        • 246

        #4
        This sounds more like an issue for the forum which pertains to the programming language of your choice.

        Comment

        • NewWebDev
          New Member
          • Jan 2011
          • 4

          #5
          Perhaps. I was hoping to solve this in javascript...bu t the web browser seems to be ignoring the WM_LBUTTONUP message so the only workaround I have found is via Windows C++ code. It doesn't sound like this is an issue that others have hit so I think I'm on my own. Thanks anyways.

          Comment

          • Samishii23
            New Member
            • Sep 2009
            • 246

            #6
            The best bet you might have would have a event fire in the C++ code that would sent a message to the browser to have it trigger the event in the browser. Other then that theres no real way to have the browser would be able to have access to your C++ code unless you programmed that into the browser control yourself.

            Just a thought.

            Comment

            Working...