Simulate mouse click at a webbrower control in Visual C++

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

paul388

Thread Starter
Joined
Jun 25, 2005
Messages
2
Hi Support,

I want to simulate a mouse click at a webbrower control in Visual C++ 6 with no response. Operating system window/xp.

SendDlgItemMessage(IDC_EXPLORER1, WM_LBUTTONDOWN , (WPARAM)MK_LBUTTON, (LPARAM)0);
SendDlgItemMessage(IDC_EXPLORER1, WM_LBUTTONUP , (WPARAM)MK_LBUTTON, (LPARAM)0);
-----------------------------------------------------------------------
But if I send the similiar message to a push button then it works. Why?

SendDlgItemMessage(IDC_BUTTON1, WM_LBUTTONDOWN , (WPARAM)MK_LBUTTON, (LPARAM)0);
SendDlgItemMessage(IDC_BUTTON1, WM_LBUTTONUP , (WPARAM)MK_LBUTTON, (LPARAM)0);
 
Joined
Oct 24, 2002
Messages
24
could u tell us a little more about

1. what exactly u are trying to do with the mouseclick
2. is it a click on a particular link inside?

code snippet would be helpful also.
 

paul388

Thread Starter
Joined
Jun 25, 2005
Messages
2
del_ross said:
could u tell us a little more about

1. what exactly u are trying to do with the mouseclick
2. is it a click on a particular link inside?

code snippet would be helpful also.
Yes, I try to simulate a click on a link inside a web browser control. What I do is to create a simple dailog application with a web browser control inside. The application will send a click message to a link within the web page but it doesn't work.

The message I send to the web browser control is

SendDlgItemMessage(IDC_EXPLORER1, WM_LBUTTONDOWN , (WPARAM)MK_LBUTTON, (LPARAM)0);
SendDlgItemMessage(IDC_EXPLORER1, WM_LBUTTONUP , (WPARAM)MK_LBUTTON, (LPARAM)0);

where IDC_EXPLORER1 is the web browser control.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top