Board index » delphi » WM_LBUTTONDOWN/UP messages
Wendell W. Pinega
Fri, 08 Nov 2002 03:00:00 GMT
I have written the attached procedure to simulate sending mouse left-click
events to applications (by directly sending WM_LBUTTONDOWN & WM_LBUTTONUP
messages to the correct window). The code works great with every
application I've tried except for those which have used the Woll2Woll 1st
and image buttons. The 1st class shape and image buttons will generate the
OnMouseDown() and OnMouseUp() events but will not generate the OnClick()
event. Any know why the 1st class controls behave this way? What
Windows messages do they neeed to work correctly?
If you would like to see if you can reproduce this problem simply add the
Any help would be very appreciated...
procedure SendLeftButtonClick(X, Y: Integer);
// Get the window at that X, Y coordinates.
// And translate the X, Y screen coordinates into the client's
// Get the parent root window.
// Check to see if the parent window is already the
// Do a left-button click.