Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Faking mouse clicks from one app to another app

Status
Not open for further replies.

SeanOConnor

Programmer
Jun 8, 2001
1
GB
I'm trying to write an app that can send mouse click messages to Internet Explorer. I've got the handle to IE's Window using GetWindow("IEFrame", NULL) and I've also got handles to the child Windows with EnumChildWindows(...). But I've had no luck with trying to do a SendMessage(hWndIE, message, WM_LBUTTONDOWN, lParam) to any of them. I can use the Window handles that I've got to do simple things like make IE draw a message box or WM_CLOSE but that's it.

I desperately need help on this and I'd be *very* grateful if anyone has any ideas!

Sean.
 
How about BM_CLICK? I have a similar issue when I want to simulate the "click event" on a "OK" button (of course it is a child). So I did this
lResult0 = SendMessage(hOkay, BM_CLICK, ByVal 0&, ByVal 0&)
lResult1 = SendMessage(hOkay, WM_LBUTTONDOWN, ByVal 0&, ByVal 0&)
lResult2 = SendMessage(hOkay, WM_LBUTTONUP, ByVal 0&, ByVal 0&)



Yes, all three of them! I hope this help even though the syntax is in VB.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top