Click here to Skip to main content
15,888,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSending keystrokes to other *non-focus* application Pin
audi023-Aug-09 23:00
audi023-Aug-09 23:00 
AnswerRe: Sending keystrokes to other *non-focus* application Pin
Adam Roderick J3-Aug-09 23:45
Adam Roderick J3-Aug-09 23:45 
QuestionRe: Sending keystrokes to other *non-focus* application Pin
David Crow4-Aug-09 2:57
David Crow4-Aug-09 2:57 
AnswerRe: Sending keystrokes to other *non-focus* application Pin
audi025-Aug-09 12:06
audi025-Aug-09 12:06 
AnswerRe: Sending keystrokes to other *non-focus* application Pin
amatecki4-Aug-09 3:04
professionalamatecki4-Aug-09 3:04 
AnswerRe: Sending keystrokes to other *non-focus* application Pin
Randor 4-Aug-09 3:23
professional Randor 4-Aug-09 3:23 
GeneralRe: Sending keystrokes to other *non-focus* application Pin
audi025-Aug-09 12:12
audi025-Aug-09 12:12 
GeneralRe: Sending keystrokes to other *non-focus* application Pin
Randor 5-Aug-09 15:30
professional Randor 5-Aug-09 15:30 
audi02 wrote:
It actually seems to be not practical


Correct. I would say that its not a good idea to use PostMessage for reliably simulating input.

audi02 wrote:
If you can give some description on this behavior and a solution, that will be great.


There are so many things happening in the windows subsystem (Win32k.sys) that it will be difficult to overcome undesired side-effects. For example when the window lost focus Win32k.sys internally keeps track of the window state, the subsystem knows not to put input messages into the window message que. When injecting rogue messages into the que you cannot always predict the outcome.

I dont really have any positive advice to give you regarding injecting user input into a window. How do you know the author of notepad or ApplicationX did not check his window state when notepad recieves mouse input? You will also battle these types of issues as well.

What type of application are you developing? Why can't you just bring the window to the top?

Best Wishes,
-David Delaune
QuestionTime Priority In LCC win32 Pin
kyai433-Aug-09 21:07
kyai433-Aug-09 21:07 
AnswerRe: Time Priority In LCC win32 [modified] Pin
Adam Roderick J3-Aug-09 22:03
Adam Roderick J3-Aug-09 22:03 
QuestionCome in please, which VC do you like? Pin
includeh103-Aug-09 20:58
includeh103-Aug-09 20:58 
AnswerRe: Come in please, which VC do you like? Pin
Michael Dunn3-Aug-09 21:54
sitebuilderMichael Dunn3-Aug-09 21:54 
GeneralRe: Come in please, which VC do you like? Pin
includeh103-Aug-09 22:01
includeh103-Aug-09 22:01 
AnswerRe: Come in please, which VC do you like? Pin
Adam Roderick J3-Aug-09 22:08
Adam Roderick J3-Aug-09 22:08 
GeneralRe: Come in please, which VC do you like? Pin
Chandrasekharan P3-Aug-09 22:18
Chandrasekharan P3-Aug-09 22:18 
AnswerRe: Come in please, which VC do you like? Pin
«_Superman_»3-Aug-09 22:09
professional«_Superman_»3-Aug-09 22:09 
GeneralRe: Come in please, which VC do you like? Pin
Naveen3-Aug-09 22:18
Naveen3-Aug-09 22:18 
AnswerRe: Come in please, which VC do you like? Pin
Rajesh R Subramanian3-Aug-09 23:01
professionalRajesh R Subramanian3-Aug-09 23:01 
AnswerRe: Come in please, which VC do you like? Pin
songBX3-Aug-09 23:29
songBX3-Aug-09 23:29 
GeneralRe: Come in please, which VC do you like? Pin
Kushagra Tiwari4-Aug-09 3:08
Kushagra Tiwari4-Aug-09 3:08 
AnswerRe: Come in please, which VC do you like? Pin
Joe Woodbury4-Aug-09 16:24
professionalJoe Woodbury4-Aug-09 16:24 
AnswerRe: Come in please, which VC do you like? Pin
Moak8-Aug-09 8:39
Moak8-Aug-09 8:39 
QuestionIs self-defined OS version safe? Pin
includeh103-Aug-09 20:39
includeh103-Aug-09 20:39 
QuestionUnicode - Excel document Pin
Karri Mohan3-Aug-09 20:35
Karri Mohan3-Aug-09 20:35 
AnswerRe: Unicode - Excel document Pin
AWEIguoxin6-Aug-09 21:14
AWEIguoxin6-Aug-09 21:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.