H
H
Heliki2022-02-09 16:57:52
C++ / C#
Heliki, 2022-02-09 16:57:52

How to get an input language switching event in Windows?

I'm trying to handle events about switching the input language in my program. The program must run in the background (not have an active window or receive these events when the program window is inactive).
I found several ways, but none worked for me.
1) processing WM_INPUTLANGCHANGE - according to the documentation, it is sent only to the active window with focus.
2) Implementation of ITfActiveLanguageProfileNotifySink or ITfLanguageProfileNotifySink. ITfActiveLanguageProfileNotifySink::OnActivated is not dspsdftncz, the ITfLanguageProfileNotifySink::OnLanguageChange method, which contains the language in the parameters, is also not called, and the ITfLanguageProfileNotifySink::OnLanguageChanged method (which does not contain the language) is only called when my window is active and has focus.
What could be the problem? What other ways can you try?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tsvetkov, 2022-02-09
@tsklab

What could be the problem?
6203d08a0f3ec613478425.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question