Can keybd_event and mouse_event send user input to a window in a hidden desktop
From: johnny xia (binqiang.xia_at_intel.com)
Date: 07/10/04
- Next message: Kelly: "Re: My Pc Got Lock, windows XP PRO"
- Previous message: Gerry Cornell: "Re: Page File Defragmentation"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 10 Jul 2004 16:25:43 +0800
Hi All,
In my application I created a desktop, say, the name is "MyDesktop". Then I
started a thread and called SetThreadDesktop() to set the thread's desktop
to "MyDesktop". And then I created a window in this thread. MyDesktop is a
hidden desktop, so the window is invisible to user.
But when my application receives commands from network, I wish to translate
those commands to keyboard and mouse events and send them to that window in
the hidden desktop.
I tried the function keybd_event and mouse_event, it seems that either of
them works. If I called those two functions in main thread, that event will
send to active desktop. But if I called those two functions in the thread of
MyDesktop, the window in MyDesktop receives nothing.
Any idea or hint will be very appreciated. Thanks in advance.
Regards,
Johnny Xia.
- Next message: Kelly: "Re: My Pc Got Lock, windows XP PRO"
- Previous message: Gerry Cornell: "Re: Page File Defragmentation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|