Share via


GetCharWidth32 (Windows Embedded CE 6.0)

1/6/2010

This function retrieves the widths, in logical coordinates, of consecutive characters in a specified range from the current font.

Syntax

WINGDIAPI BOOL WINAPI GetCharWidth32(
  HDC hdc,
  UINT iFirstChar,
  UINT iLastChar,
  LPINT lpBuffer
);

Parameters

  • hdc
    [in] Handle to the device context.
  • iFirstChar
    [in] Unsigned integer that specifies the first character in the group of consecutive characters.
  • iLastChar
    [in] Unsigned integer that specifies the last character in the group of consecutive characters. This last character must not precede the first character that you specified in iFirstChar.
  • lpBuffer
    [out] Pointer to a buffer that receives the character widths, in logical coordinates.

Return Value

A nonzero value indicates success. Zero indicates failure. To get extended error information, call GetLastError.

Remarks

The range of characters that you establish by setting iFirstChar and iLastChar is inclusive; that is, the returned widths include the widths of the characters specified by iFirstChar and iLastChar.

If a character does not exist in the current font, GetCharWidth32 assigns the width of the default character to that character.

Requirements

Header windows.h
Library coredll.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Other Resources

Fonts Functions