This example sets the window attributes and those of its children to make their WND and TEXT orientations RTL.
#define INCL_PMBIDI #include <OS2.H> #include <PMBIDI.H> VOID SetWindowBidiAttributes(HWND hwnd) { if (WinSetLangInfo(hwnd, LI_BD_WND_ATTR, /* Type of information to be set is window attributes */ BDA_WND_ORIENT_RTL | /* Data to be set is RTL Wnd and Text orientations */ BDA_TEXT_ORIENT_RTL, BDAM_WND_ORIENTATION | /* Masks indicating which attributes to modify */ BDAM_TEXT_ORIENTATION, LIF_CHILD_INHERIT, /* Flag to indicate that the operation is to be */ /* performed for that window and its children */ 0L)) /* Reserved to 0 */ WinMessageBox (HWND_DESKTOP, hwnd, "Operation succeeded", "Result", 0, MB_OK); else WinMessageBox (HWND_DESKTOP, hwnd, "Operation failed", "Error", 0, MB_OK); }