COMPOSITIONFORM


typedef tagCOMPOSITIONFORM {
    DWORD  dwStyle;
    POINT  ptCurrentPos;
    RECT  rcArea;
}COMPOSITIONFORM;

The dwStyle member is specified by CFS_xxxx. The ptCurrentPos member specifies the size and position of the bounding rectangle and the start position of the composition window.

CFS_DEFAULT

The CFS_DEFAULT value moves the composition window out to the default position. IME can display the composition window outside client area. It might be on a floating window.

CFS_POINT

The CFS_POINT value displays the composition window at the upper left of the latter window, at the position indicated by ptCurrentPos. The ptCurrentPos member indicates the coordinates relative to the upper left of the latter window, with the low-order word representing the x coordinate and the high-order word the y coordinate.

CFS__FORCE_POSITION

The CFS_FORCE_POSITION value displays the composition window at the upper left of the window as designated by ptCurrentPos. The ptCurrentPos member indicates the coordinates relative to the upper left of the latter window, with the low-order word representing the x coordinate and the high-order word the y coordinate.

Some near caret operation IMEs show its conversion window by adjusting the position specified by the system or the application. The CFS_FORCE_POSITION informs IMEs to stop this adjustment.

If the CFS_FORCE_POSITION bit is off, some IMEs adjust their position according to the position specifying in ptCurrentPos with CFS_POINT style.

CFS_RECT

The CFS_RECT value is the same as CFS_POINT except that the bounding rectangle is specified by rcCompArea. The coordinates are relative to the upper left of the window.

When the style of the COMPOSITIONFORM structure is CFS_POINT or CFS_FORCE_POINT, the IME starts to draw the composition string from the position that is specified by ptCurrentPos of the COMPOSITIONFORM structure that is given by the application. If the style has CFS_RECT, the composition string will be inside of the rectangle that is specified by rcArea. If not, rcArea is the client rectangle of the application window.

When the application specifies the composition font, the composition window is rotated as the escapement of the composition font. The direction of the composition string follows the escapement of the font in a composition window. IME starts to draw the composition string as follows.

The escapement of the composition font is 0

This is normal case. The ptCurrentPos member of the composition form structure points left and top of the string. All IMEs support this type.

The escapement of the composition font is 2700.

This is a case of a vertical writing. When the application provides the vertical writing, the application may set the 2700 escapement in the composition font that is set by ImmCompositionFont. The composition string will be drawn downward. The IMEs that have UI_CAP_2700, UI_CAP_ROT90 or UI_CAP_ROTANY capability support this type of the composition window.

The escapement of the composition font is 900 or 1800

The IMEs that have UI_CAP_ROT90 or UI_CAP_ROTANY capability support this type of the composition window.

The escapement of the composition font is any value.

The IMEs that have UI_CAP_ROTANY capability support this type of the composition window.

UI_CAP_ROT90 and UI_CAPS_ANY are the option for the enhancement of the IME. UI_CAP_2700 is recommended.

This structure is used with the IMC_SETCOMPOSITIONWINDOW and IMC_SETCANDIDATEPOS messages.