Adding a status line to a window

┌──────────────────────────────────────────────────────────────────────┐
│Add an FCF_DBE_APPSTAT flag to an application window to create a      │
│DBCS-unique status bar for inputting DBCS and to show a keyboard shift│
│status to users.                                                      │
└──────────────────────────────────────────────────────────────────────┘

An Asian user inputs DBCS using a SBCS-DBCS conversion method. For example, a Japanese user inputs phonetic sound of Kanji with alphabet keys and converts it to Kanji characters. To show the intermediate result of the SBCS-DBCS conversion, OS/2 needs to open a SBCS-DBCS conversion area. If the SBCS-DBCS conversion area is opened at the current cursor position, this is called an on-the-spot conversion. If the area is opened next to the keyboard status area, which is located at the bottom of a client window, it is called a fixed-position conversion. The on-the-spot conversion is preferred to the fixed-line conversion, because the user does not need to move his eyes to the bottom of a client window.

FCF_DBE_APPSTAT is a DBCS-unique flag to add a DBCS-unique status line to a PM frame window. The status line consists of the following three controls; a keyboard status area, a DBCS conversion area and an application status area. The keyboard status area shows whether a user is in a DBCS mode or a SBCS mode. The DBCS conversion area is used to show the intermediate result of SBCS-DBCS conversion at the fixed-position DBCS conversion. In order to allow a user to input DBCS, an application window needs to have this frame control flag even if you provide a user with on-the-spot conversion. Because DBCS OS/2 has a variety of keyboard statuses, we suggest that every window asking a user to press keys should have this frame control in order to show a user the current keyboard-shift status.

On SBCS OS/2, FCF_DBE_APPSTAT is ignored and does not cause any trouble.
a PM window with a status line
┌──────────────────────────────────────────────────────────────────────┐
│ ┌─┬──────────────────┬───────────────────────┬─────────────────┬─┬─┐ │
│ │-│ │ Title │ │││ │
│S├─┴──────────────────┴───────────────────────┴─────────────────┴─┴─┤s│
│i│ Application Menu │i│
│z├────────────────────────────────────────────────────────────────┬─┤z│
│i│ ││i│
│n│ ├─┤n│
│g│ │ │g│
│ │ │ │ │
│B│ Client Window │ │B│
│o│ │ │o│
│r│ │ │r│
│d│ │ │d│
│e│ ├─┤e│
│r│ ││r│
│ ├─┬────────────────────────────────────────────────────────────┬─┼─┤ │
│ ││ ││ │ │
│ ├─┴───────┬────────────────────────────────────────────────────┴─┴─┤ │
│ │ KBDSTAT │ PECIC or APPSTAT │ │
│ └─────────┴────────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────────────┘

Adding a DBCS conversion area to a window (source: MISCMAIN.C)

#define INCL_WIN
#define INCL_GPI
#define INCL_DOS
#define INCL_DOSNLS
#define INCL_NLS

#include <os2.h>                       /* System Include File      */
   ...
ULONG flCreate;
   ...
  flCreate= FCF_SIZEBORDER | FCF_MENU | FCF_MAXBUTTON | FCF_MINBUTTON
          | FCF_SYSMENU | FCF_TITLEBAR | FCF_DBE_APPSTAT;
  hwndEditorWin = WinCreateStdWindow(HWND_DESKTOP,
                                    WS_VISIBLE,
                                    &flCreate,
                                    "editorWindow",
                                    "Simple Editor",
                                    0L,
                                    NULLHANDLE,
                                    WID_EDITOR,
                                    (PHWND) & hwndEditorClient);
   ...


[Back: Preparing for DBCS input]
[Next: Allowing a user to perform on-the-spot conversion]