please dont rip this site Prev Next

ActivateKeyboardLayout info  Overview  Group

The implementations of ActivateKeyboardLayout in Windows NT and Windows 95 are substantially different. To accommodate these differences, this reference page first presents the Windows NT implementation in its entirety, followed by the Windows 95 version.

    Windows NT:

The ActivateKeyboardLayout function activates a different keyboard layout and sets the active keyboard layout for the entire system rather than the calling thread.

HKL ActivateKeyboardLayout(

    HKL hkl,

// handle to keyboard layout

    UINT Flags 

// keyboard layout flags

   );

Parameters

hkl
Identifies the keyboard layout to be activated. The layout must have been loaded by a previous call to the LoadKeyboardLayout function. This parameter must be either the handle to a keyboard layout or one of the following values:

Value

Meaning

HKL_NEXT

Selects the next layout in the circular list of loaded layouts maintained by the system.

HKL_PREV

Selects the previous layout in the circular list of loaded layouts maintained by the system.

Flags
Specifies how the keyboard layout is to be activated. This parameter can be one of the following values:

Value

Meaning

KLF_REORDER

If this bit is set, the system’s circular list of loaded keyboard layouts is reordered. If this bit is not set, the list is rotated without a change of order. For example, if a user had an English layout active, as well as having French, German and Spanish layouts loaded (in that order), then activating the German layout with the KLF_REORDER bit set would produce the following order: German, English, French, Spanish. Activating the German layout without the KLF_REORDER bit set would produce the following order: German, Spanish, English, French.

If less than three keyboard layouts are loaded, the value of this flag is irrelevant.

KLF_UNLOADPREVIOUS

The previously active layout is unloaded.

Return Values

If the function succeeds, the return value is the previous keyboard layout handle. Otherwise, it is zero. To get extended error information, use the GetLastError function.

Remarks

Several keyboard layouts can be loaded at any one time, but only one is active at a time. Loading multiple keyboard layouts makes it possible to rapidly switch between layouts.

See Also

LoadKeyboardLayout, GetKeyboardLayoutName, UnloadKeyboardLayout 

    Windows 95

The ActivateKeyboardLayout function sets the input language for the current thread. This function accepts a keyboard layout handle that identifies a locale as well as the physical layout of the keyboard.

HKL ActivateKeyboardLayout(

    HKL hkl,

// handle to keyboard layout

    UINT Flags 

// keyboard layout flags

   );

Parameters

hkl
Handle to a keyboard layout or a zero-extended locale identifier. This parameter can be any valid keyboard layout handle obtained using the LoadKeyboardLayout or GetKeyboardLayoutList function or one of the following values:

Value

Meaning

HKL_NEXT

Selects the next layout in the keyboard layouts list maintained by the system.

HKL_PREV

Selects the previous layout in the keyboards layout list maintained by the system.

Flags
Specifies the keyboard layout flags. The value of this parameter can be:

Value

Meaning

KLF_REORDER

Reorders the keyboard layouts list by moving the given keyboard layout handle to the head of the list. If this value is not given, the list is rotated without a change of order. For example, if a user had an English layout active, as well as having French, German and Spanish layouts loaded (in that order), then activating the German layout with the KLF_REORDER bit set would produce the following order: German, English, French, Spanish. Activating the German layout without the KLF_REORDER value set would produce the following order: German, Spanish, English, French.

Return Values

If the function succeeds, the return value is the previous keyboard layout handle. Otherwise, it is zero. To get extended error information, use the GetLastError function.

Remarks

Several keyboard layouts can be loaded at any one time, but only one is active at a time. Loading multiple keyboard layouts makes it possible to rapidly switch between layouts.

An application can create a valid keyboard layout handle by setting the high word to zero and the low word to a locale identifier. Using such keyboard layout handles changes the input language without affecting the physical layout.

When multiple input method editors (IMEs) are allowed for each locale, passing in a keyboard layout handle in which the high word (the device handle) is zero activates the first IME in the list “belonging” to the locale.

See Also

LoadKeyboardLayout, GetKeyboardLayoutName, UnloadKeyboardLayout 


file: /Techref/os/win/api/win32/func/src/f00_17.htm, 8KB, , updated: 2000/4/7 11:19, local time: 2024/12/23 16:41,
TOP NEW HELP FIND: 
18.119.116.77:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.ecomorder.com/Techref/os/win/api/win32/func/src/f00_17.htm"> ActivateKeyboardLayout</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to massmind.ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .