Share via


CImeCUICandWindow::CCandListArea::Item::CreateRenderingMetrics (Windows Embedded CE 6.0)

1/6/2010

This method allocates a memory block and stores item metrics.

Syntax

static HANDLE CreateRenderingMetrics(
  HDC hDC,
  INT iMaxCand,
  WCHAR* pszCandidates,
  WCHAR* pszInlineComments,
  HFONT hFontCandidates,
  HFONT hFontInlineComments,
  HICON hIconMemo,
  DWORD dwFlags
);

Parameters

  • hDC
    [in] Handle to the device context for the window.
  • iMaxCand
    [in] 32-bit integer that indicates the zero-based index for the last candidate displayed in the candidate list.
  • pszCandidates
    [in] Pointer to the text buffer containing the candidate strings.
  • pszInlineComments
    [in] Pointer to the text buffer containing the inline comment strings.
  • hFontCandidates
    [in] Handle to the font for the candidate strings.
  • hFontInlineComments
    [in] Handle to the font for the inline comment strings.
  • hIconMemo
    [in] Set to zero (0). This parameter is reserved for future use.
  • dwFlags
    [in] Set to zero (0). This parameter is reserved for future use.

Return Value

The return value is a handle to a memory block allocated in this method. The IME passes this value to other methods of the CImeCUICandWindow::CCandListArea::Item subclass.

Remarks

To align candidate and inline comment strings, the maximum width of the strings must be calculated.

OEMs can use the CreateRenderingMetrics method to go through all of the candidates, and calculate the size and positions of the candidate and inline comment strings. To refer to these values when drawing the strings, this method allocates a memory block and stores these values in it. This method returns the handle of the memory block to the IME. The IME then passes this handle value to the other methods of the Item object, so that the methods can draw the strings at the correct position.

This method can also be used to share any value among the item drawings.

The text buffers for the pszCandidates and pszInlineComments parameters are formatted as a sequence of one or more null-terminated strings, with a double null termination at the end.

Requirements

Header imjpskin.h
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

CImeCUICandWindow