The instance of the default Conversion Part Class is an object window which creates a set of ConversionText windows(actually visible windows). The default conversion class supports only horizontal(Left-to-Right) and vertical(Top-to-Bottom) writing, i.e. c apability is UIC_270 in this release. The owner window of the conversion text windows is the application window specified in IMInstance. The appearance of the conversion text window differs along with the style of the conversion window as follows:
CPS_DEFAULT:
When no space for displaying the conversion text window is available, WM_IMENOTIFY(IMN_CONVERSIONFULL) message is posted to the application window.
The default color of the conversion text window is described below:
┌──────────────────────────────┬──────────┬──────────┐│ │Fore Color│Back Color│ ├──────────────────────────────┼──────────┼──────────┤ │CP_ATTR_INPUT │White │Black │ ├──────────────────────────────┼──────────┼──────────┤ │CP_ATTR_TARGET_CONVERTED │White │Black │ ├──────────────────────────────┼──────────┼──────────┤ │CP_ATTR_CONVERTED │Black │White │ ├──────────────────────────────┼──────────┼──────────┤ │CP_ATTR_TARGET_NOTCONVERTED │Black │White │ ├──────────────────────────────┼──────────┼──────────┤ │CP_ATTR_INPUT_ERROR │White │Red │ └──────────────────────────────┴──────────┴──────────┘
IME can change this color by sending WM_SETWINDOWPARAMS message described
below.
WM_IMEREQUEST
IMR_CONVRESULT
When the default conversion window received this message, its conversion
text windows are redrawn using ConversionString, ConversionAttribute, ConversionPos,
ConversionFont and ConversionAngle which are specified in IMInstance.
IMR_OTHERINFO_HWND
The owner window of the conversion text windows are changed.
WM_QUERYIMEWINDOWCAPS
Returns the following value in mparam 2 according to the index in mparam 1.
IWC_CONVERSIONANGLE : UIC_270 in this release. IWC_CONVERSIONMARGIN : 2 in this release. IWC_FORCEPOSITION : FALSE in this release.
The following control data is defined for the default conversion part class to set/query the color for the specified string attributes.
typedef struct _CONVCLR { /* convclr */ ULONG ulAttr; COLOR cFore; COLOR cBack; } CONVCLR; typedef struct _CONVERSIONDATA { /* conversiondata */ USHORT usSize; ULONG ulCount; CONVCLR aConvClr[1]; } CONVERSIONDATA; where ulAttr : Field attribute(CP_ATTR_*) cFore : Foreground color for ulAttr cBack : Background color for ulAttr usSize : Size of this structure ulCount: Count of ConvClr structures held in this structure aConvClr: Array of ConvClr structures