Re: Sending keyboard and mouse inputs to non-interactive desktop
- From: student_nus <studentnus@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 25 Mar 2008 11:19:02 -0700
Hi,
Moving apart, lets just consider the case I want to send mouse events to a
window -> visible and on the desktop, lets call it ABC using
SendMessage/PostMessage only. I dont want to use SendInput because I dont
want to move the mouse.
An example of how I can send WM_MOUSEMOVE Msg is below
SetCapture(ABC);//handle to the window ABC
int hit = SendMessage(ABC,WM_NCHITTEST,0,coordinates);
//coordinates are coordinates for the mouse
SendMessage(ABC,WM_SETCURSOR,(WPARAM)ABC,MAKELPARAM(hit,WM_MOUSEMOVE));
SendMessage(ABC,WM_NCMOUSEMOVE,hit, coordinates);
ReleaseCapture();
I am using Spy++ to see what messages a normal application window actually
receives when a mouse moves over it but when I send the exact same messages
to the window ABC I am unable to even highlight the menu bar...
Are there any more steps to be taken when using SendMessage/PostMessage??
Hi Paul,
Thanks for the input...have already tried that path and havent been
able to do much.
Thanks!
"Gary Chanson" wrote:
.
"student_nus" <student_nus@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CD6574F7-E1DF-4682-AF63-DD881C536CF1@xxxxxxxxxxxxxxxx
Hi,
I am trying to simulate keyboard and mouse inputs to a non-interactive
desktop.
I have made multiple desktops and I need to send inputs to application
windows running on the hidden desktops...
Is there a way to do this?
To the best of my knowledge, no.
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
- Follow-Ups:
- Re: Sending keyboard and mouse inputs to non-interactive desktop
- From: Paul Baker [MVP, Windows - SDK]
- Re: Sending keyboard and mouse inputs to non-interactive desktop
- References:
- Re: Sending keyboard and mouse inputs to non-interactive desktop
- From: Gary Chanson
- Re: Sending keyboard and mouse inputs to non-interactive desktop
- Prev by Date: Re: Sending keyboard and mouse inputs to non-interactive desktop
- Next by Date: Re: Sending keyboard and mouse inputs to non-interactive desktop
- Previous by thread: Re: Sending keyboard and mouse inputs to non-interactive desktop
- Next by thread: Re: Sending keyboard and mouse inputs to non-interactive desktop
- Index(es):
Relevant Pages
|