> Try setting the wParam of SendMessage() to MK_LBUTTON.
>> Try setting the wParam of SendMessage() to MK_LBUTTON.
>
>Thanks Gabriele,
>
>i tried your suggestion without any success. Anyone got further hints
>on how to solve this problem?
I've never had a lot of success sending dummy mouse clicks to
other windows, I think that Windows knows where the mouse is and
just doesn't accept that it was clicked.
The help says that lParam should contain the mouse co-ordinates,
does 0 make sense in your app?
Do you need to send a mouse click, could you use a different
message, perhaps a user registered message?

Signature
Jeff Gaines - Damerham Hampshire UK
Jens Meyer - 21 May 2004 14:42 GMT
Thanks Jeff for your answer,
i allready tried to submit the mouse-click.coordinates. But i had no
luck. The Game runs in a small explorer window which only needs a
mouseclick to start. The coordinates are not important.
But meanwhile i solved the problem with a small workaround.
First i put the window to foreground (SetForegroundWindow), then i move
the mousecursor over the window (eg. Cursor.Current = new
Point(100,100);) and as a last thing i call SendMessage with a
mouseclick as messagetype and also the coordinates.
This is quite an afford to let a foreign application accept a mousclick.
But now it works acceptable.
Thanks for anybodys help on this issue.
Greetz
Jens