GetCharWidthFloatA function

The GetCharWidthFloat function retrieves the fractional widths of consecutive characters in a specified range from the current font.

Syntax

BOOL GetCharWidthFloatA(
  HDC    hdc,
  UINT   iFirst,
  UINT   iLast,
  PFLOAT lpBuffer
);

Parameters

hdc

A handle to the device context.

iFirst

The code point of the first character in the group of consecutive characters.

iLast

The code point of the last character in the group of consecutive characters.

lpBuffer

A pointer to a buffer that receives the character widths, in logical units.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The returned widths are in the 32-bit IEEE floating-point format. (The widths are measured along the base line of the characters.)

If the iFirstChar parameter specifies the letter a and the iLastChar parameter specifies the letter z, GetCharWidthFloat retrieves the widths of all lowercase characters.

If a character does not exist in the current font, it is assigned the width of the default character.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)
Library Gdi32.lib
DLL Gdi32.dll

See Also

Font and Text Functions

Fonts and Text Overview

GetCharABCWidths

GetCharABCWidthsFloat

GetCharWidth32