tags:

views:

62

answers:

2

I am writing on screen keyboard application. The keyboard is running in separate process and the application window is topmost and does not get focus. When I switch between applications, the language is changed. How can I get the current selected language on toolbar and how can I be notified when it is changed?

InputLanguageManager and InputLanguage classes of .net can only do this for applications in which they are used.

I found that WM_INPUTLANGCHANGE message is send when the language is changed. But this message is only send to focused window.

The osk.exe application in Windows 7 can do this. Please give me some suggestions how I reach this behavior.

A: 

A quick trip around Google gave this result. It seems to indicate that system hooks is the right way to go about this.

mbanzon
A: 

Global hooks works well, but the WM_INPUTLANGCHANGE and WM_INPUTLANGCHANGEREQUEST are only send when you change input language by pressing hot keys or on toolbar. But when when you switch between applications with different input languages, the language is changed on the toolbar but no windows messages are send.

Andrey Gordeyev