Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can i apply a event system wide.
actually i want to apply the function activatekeyboardlayout() on the whole system.
don't have any idea of it in windows programming.
language used is: Visual C++
Posted

1 solution

I don't really know if you can get the effect equivalent to ActivateKeyboardLayout for the whole systems (I don't think you can), but you certainly cannot achieve it by calling this function, because the layout is set per thread, and there is no parameter of the call which would let you specify the thread. The thread is determined as the thread where you call this function. Please see:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646289%28v=vs.85%29.aspx[^].

You should also take into account that different threads belong to different process in the systems, and the processes are well isolated. The dominating ideology for the control of process and thread internal characteristics is isolation and independence; this looks quite natural considering the roles of processes and threads in a system.

Generally, it is typical that the functional characteristics of the thread such as culture can be setup using only the calls from that thread. From the other hand, "dynamic" characteristics of a thread such as priority or apartment states are setup in different threads.

—SA
 
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