Programmically simulate clicking on webbrowser2 object

This is a discussion on Programmically simulate clicking on webbrowser2 object within the Windows Programming forums, part of the Platform Specific Boards category; Programmically simulate clicking on webbrowser2 object how do i Programmically click on webbrowser2 object? i tried Code: m_webbrowser.SendMessage(WM_LBUTTONDBLCLK,MK_LBUTTON, (LPARAM)MAKELONG(291, 125) ...

  1. #1
    Registered User
    Join Date
    Mar 2004
    Posts
    114

    Programmically simulate clicking on webbrowser2 object

    Programmically simulate clicking on webbrowser2 object

    how do i Programmically click on webbrowser2 object?

    i tried
    Code:
    m_webbrowser.SendMessage(WM_LBUTTONDBLCLK,MK_LBUTTON, (LPARAM)MAKELONG(291, 125) );
    		
    m_webbrowser.SendMessage(WM_LBUTTONDOWN,MK_LBUTTON, (LPARAM)MAKELONG(291, 125) );
    but they do not work. is there anyway to simulate clicks on it?
    there are some conditions that i must strictly follow
    - i do not want my actual mouse cursor to move at all.
    - the click must be relative to the control, not to the screen

    rdgs, hanhao
    using VC++ 6.0

  2. #2
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    then you have to offset the coordinates relative to the windows RECT. get the rect of the window in question, then add the relative offset to find the target coordinates. AFAIK, it wont move the mose cursor.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Programmically simulate clicking on webbrowser2 object
    By hanhao in forum Windows Programming
    Replies: 1
    Last Post: 06-24-2007, 11:34 PM
  2. circular doubly linked list help
    By gunnerz in forum C++ Programming
    Replies: 5
    Last Post: 04-28-2007, 09:38 PM
  3. Clicking an Object in OpenGL.
    By gpr1me in forum Game Programming
    Replies: 5
    Last Post: 03-26-2006, 10:12 PM
  4. Question on l-values.
    By Hulag in forum C++ Programming
    Replies: 6
    Last Post: 10-13-2005, 05:33 PM
  5. A question about constructors...
    By Wolve in forum C++ Programming
    Replies: 9
    Last Post: 05-04-2005, 05:24 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21