There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware missing monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Simulate mouse click at a webbrower control in Visual C++


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
paul388's Avatar
Junior Member with 2 posts.
 
Join Date: Jun 2005
Experience: Beginner
25-Jun-2005, 01:51 AM #1
Simulate mouse click at a webbrower control in Visual C++
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);
del_ross's Avatar
Junior Member with 24 posts.
 
Join Date: Oct 2002
25-Jun-2005, 09:12 AM #2
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's Avatar
Junior Member with 2 posts.
 
Join Date: Jun 2005
Experience: Beginner
25-Jun-2005, 07:41 PM #3
Quote:
Originally Posted by del_ross
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.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 04:21 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.