GetCharWidth32
A version of this page is also available for
4/8/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 |
Windows Mobile | Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later |