Re: Sending keyboard and mouse inputs to non-interactive desktop

Tech-Archive recommends: Speed Up your PC by fixing your registry



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




.



Relevant Pages

  • Re: HOLDLOCK?
    ... "Greg Sullivan" wrote in message ... insert abc values ... (now flip to a second QA window) ...
    (microsoft.public.sqlserver.programming)
  • Re: Set up window to run certain file using a specific program
    ... > want window to use ABC to run all *.abc files, ... Regards, ... Prev by Date: ...
    (comp.lang.tcl)
  • Set up window to run certain file using a specific program
    ... If I need window to run certain files using a specific program, ... For example, if I have files with extension *.abc, and I ... want window to use ABC to run all *.abc files, ... Prev by Date: ...
    (comp.lang.tcl)
  • Re: Preventing window closing via password
    ... Whether using ABC or Clarion Legacy Templates the embed is the same ... This should stop every attempt to close the window. ... Frank ...
    (comp.lang.clarion)
  • Re: Troubles with setting OE6 as a default email client in XP
    ... > and I can't add it because I dont have administrator's rights. ... See if you can check on your settings from a command window. ... > wanted to say is that I can't make my default client neither OE nor OL. ... >> I have problem with setting OE6 as a default email client. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)