Example - WinQueryKbdLayer

This example queries the keyboard layer and draws a message box saying whether it was national language (Arabic/Hebrew) or Latin.

#define INCL_PMBIDI
#define INCL_WINDIALOGS
#include <OS2.H>
#include <PMBIDI.H>

ULONG QueryKbdLayer(HWND hwnd)
 {
 ULONG KbdLayer;

    KbdLayer = WinQueryKbdLayer (hwnd); /* Window handle of the window whose */
                                        /* keyboard layer is queried         */
    if (KbdLayer)
           WinMessageBox (HWND_DESKTOP,
                          hwnd,
                          "The keyboard layer is National",
                          "Result",
                           0,
                           MB_OK);

    else
           WinMessageBox (HWND_DESKTOP,
                          hwnd,
                          "The keyboard layer is Latin",
                          "Result",
                           0,
                           MB_OK);

 }


[Back: Notes - WinQueryKbdLayer]
[Next: Related Functions - WinQueryKbdLayer]