simulate mouse click on flash window in C++ - Programmer

This is a discussion on simulate mouse click on flash window in C++ - Programmer ; Hello, I have a Windows application. The application contains 2 windows. One window running inside the display screen like normal window does. I give this winodw the name 'visible window'. Another window is running out of the display screen. I ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: simulate mouse click on flash window in C++

  1. simulate mouse click on flash window in C++

    Hello,

    I have a Windows application. The application contains 2 windows. One
    window running inside the display screen like normal window does. I
    give this winodw the name 'visible window'. Another window is running
    out of the display screen. I give this window the name 'invisible
    window'. How I do that is just call Windows API MoveWindow and set the
    target window's location to (5000, 5000, 5500, 5500) so it won't show
    on the screen. The 'invisible window' is a layered window. So even
    running out of the screen I still can get the image of this window. I
    set a timer at beginning. On each timer event I call BitBlt to show the
    'invisible window' inside the client area of the 'visible window'.
    Inside the 'invisible window' is a web browser control. So for the
    user's point of view the 'visible window' is the same as the 'invisible
    window' if the I can simulate the user input. The keyboard part is done
    and the mouse part is half done. If the web control just display HTML
    page it works fine. But if the web control display flash movie the
    mouse event simulation failed.

    The way to simulate the mouse event is that.
    I just make the mouse move as example.

    1. On 'visible window' I have the WM_MOUSEMOVE message handler. I get
    the current cursor position in 'visible window' client position. Then I
    send the message WM_MOUSEMOVE to the 'invisible window' with the same
    parameter.

    2. I am sure the flash movie contains some buttons and if the mouse
    cursor over one of these buttons the cursor will change to 'hand'
    cursor.

    3. In the 'visible window' I move the mouse over the image of one of
    the buttons and I see the cursor changes to the 'hand' and immediately
    changes back the the 'arrow'. I want the cursor keep on 'hand'. I know
    there is something wrong among these steps. But I don't know how to
    make it.

    If you by chnace know how to solve this problem it will be very
    helpful. Thanks in advance for any advice!

    Tom


  2. Re: simulate mouse click on flash window in C++

    "Tom" wrote in message
    news:1121891922.346161.242700@g43g2000cwa.googlegr oups.com...
    > 3. In the 'visible window' I move the mouse over the image of one of
    > the buttons and I see the cursor changes to the 'hand' and immediately
    > changes back the the 'arrow'. I want the cursor keep on 'hand'. I know
    > there is something wrong among these steps. But I don't know how to
    > make it.
    >


    Tom, does your visible window hande WM_SETCURSOR? That is what changes the
    cursor from an arrow to a hand.

    -- David
    http://www.dcsoft.com



  3. Re: simulate mouse click on flash window in C++

    Hi David,

    The visible window derived from CView which is a MFC class. I made a
    test on WM_SETCURSOR message handler. Whenever I call the base class's
    method or just return TRUE the result is the same.

    Another problem is that if the IE window is just show the HTML page the
    cursor works fine without change the code.

    I almost lost my sense after several days tracing and debuging.


+ Reply to Thread