Tech Support Guy banner
Status
Not open for further replies.
1 - 3 of 3 Posts

·
Registered
Joined
·
2 Posts
Discussion Starter · #1 ·
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);
 

·
Registered
Joined
·
2 Posts
Discussion Starter · #3 ·
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.
 
1 - 3 of 3 Posts
Status
Not open for further replies.
Top