An application that wishes to act as a Language Viewer uses the WinSetLangViewer API. This allows the application to define a window handle that is known to PM to be the new Language Viewer window. PM supports only one Language Viewer. That is, when WinSetLangViewer is issued, the window handle that is referenced becomes the new viewer, and the old viewer does not function as a viewer anymore.
When a window acts as a Language Viewer it receives WM_LANGVIEWINFOCHANGED messages from the system. These messages define the current changes in bidirectional state that are made to the window that has the focus. Also, PM posts a WM_LANGVIEWINFOCHANGED message to the Language Viewer window to notify it that it should update its display, since a new window (probably with a different set of bidi attributes and keyboard layer) becomes the focus window.