Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello all,

I am developing a simple input method, the requirement is: when some input box in other application, then my input application should show out and after input hide by itself.

Now i set a timer to detect when i should show my window out, so i need to detect the input box window handle of other application, if it is a valid handle, then i will show my input method out. But unfortunately, i don't know to do. Do anybody can help me? thanks very much.

i tried GetForegroundInfo to get the foreground window handle and the focus window handle, but it always return valid value whatever it need input or not.
Posted

Thanks Richiard,

I think I have to give up this method as i don't know the type of window i am searching for.

whatever, thanks for your reply.
 
Share this answer
 
All Windows have handles, so you need to have some more information about the type of window you are searching for. Also from your question you are going to miss lots of input if your application relies on a timer. You probably need to look into the use of hooks[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900