Customizing the Default Composition Window (Windows CE 5.0)
Japanese IME 3.1 enables you to customize specific areas of the IME default composition window. The default composition window shows the composition string that is typed by the user and then converted by the IME. The guideline window shows a static text that usually represents a set of guidelines issued by the IME.
The following list shows the classes provided by Japanese IME 3.1 that you can use to customize the default composition window:
- CImeCUIDefCompWindow
- CImeCUIDefCompWindow::CloseButton
- CImeCUIDefCompWindow::CompArea
The following list shows the files in which the source code for the default composition windows is located:
- ce\ccuidefcompwnd.cpp -- Standard UI for handheld PC-style shell.
- cexp\ccuidefcompwnd.cpp -- Skin sample resembling the shell in Microsoft Windows XP.
The following illustration shows an outline of the customizable areas within the default composition window:
The following table shows the items that the composition window displays.
Item | Description |
---|---|
Composition string area | Displays the text that is typed by the user or generated by the IME. |
Close button | Allows users to close the composition window. The close button is located at the left of the button area. The close button and the button area are top-aligned. |
Gripper | Allows users to resize the composition window. The width of the gripper is equal to the width of the close button. The height of the gripper is the height of the composition string area minus the height of the close button. |
Composition window
The following illustration shows an example of a composition window:
The width of the composition window is specified in the registry, under the HKEY_LOCAL_MACHINE\Software\Microsoft\IMEJP\3.1\Window\convWnd key. The width of the composition string area is calculated from this registry value. You calculate the height of the composition window by adding the height of the font to the top and bottom margins of the composition string area.
Guideline window
The following illustration shows an example of a guideline window:
The width of the composition string area in the guideline window is calculated from the font and text to be displayed. The width of the guideline window is calculated by adding together the width of the close button, the width of the composition string area, the left and right margins of the window, and the width of the borders if the borders are specified by the CImeCUIDefCompWindow::GetWndStyle or the CImeCUIDefCompWindow::GetWndStyleEx method.
Calculate the height of the guideline window by adding together the height of the composition string area, the top and bottom margins of the window, and the height of the borders if they are specified by GetWndStyle or GetWndStyleEx.
The following table shows the methods you can use to customize the default composition window.
Method | Description |
---|---|
CImeCUIDefCompWindow::CloseButton::AdjustRect | Adjusts the bounding rectangle of the close button. |
CImeCUIDefCompWindow::CloseButton::GetSize | Retrieves the size of the close button. |
CImeCUIDefCompWindow::CloseButton::PaintBackground | Draws the borders, if required, and the background of the close button. |
CImeCUIDefCompWindow::CloseButton::PaintBitmap | Draws the face of the close button. |
CImeCUIDefCompWindow::CompArea::GetMargins | Retrieves the top, bottom, right, and left margins of the composition string area of the default composition window. |
CImeCUIDefCompWindow::GetMargins | Specifies the top, bottom, right and left margins of the default composition window. |
CImeCUIDefCompWindow::GetTextColor | Retrieves the color of the text in the guideline window. |
CImeCUIDefCompWindow::GetWndStyle | Retrieves the window styles of the default composition window. |
CImeCUIDefCompWindow::GetWndStyleEx | Retrieves the extended window style of the default composition window. |
CImeCUIDefCompWindow::IsHoverActionSupported | Determines whether objects in the default composition window check for a mouse hover. |
CImeCUIDefCompWindow::PaintBackground | Draws the background of the default composition window. This method can also be used to draw the borders of the default composition windows if the borders are not specified by GetWndStyle or GetWndStyleEx. |
CImeCUIDefCompWindow::PaintGripper | Draws the gripper of the default composition window. |
See Also
Japanese IME 3.1 Customizable User Interface
Send Feedback on this topic to the authors