This example sets the keyboard layer to National and posts the message WM_KBDLAYERCHANGED through setting the impact flags bit to zero.
#define INCL_PMBIDI
#include <OS2.H>
#include <PMBIDI.H>
VOID SetKbdLayer(HWND hwnd)
{
if (WinSetKbdLayer(hwnd,
KL_NATIONAL, /* First country/language layout */
SKLF_SENDMSG)) /* Post the WM_KBDLAYERCHANGED message */
WinMessageBox (HWND_DESKTOP,
hwnd,
"Setting keyboard layer succeeded",
"Result",
0,
MB_OK);
else
WinMessageBox (HWND_DESKTOP,
hwnd,
"Setting keyboard layer failed",
"Error",
0,
MB_OK);
}