EN
本內容沒有您的語言版本,但有英文版本。

GetCharWidthI function

The GetCharWidthI function retrieves the widths, in logical coordinates, of consecutive glyph indices in a specified range from the current font.

Syntax


BOOL GetCharWidthI(
  _In_   HDC hdc,
  _In_   UINT giFirst,
  _In_   UINT cgi,
  _In_   LPWORD pgi,
  _Out_  LPINT lpBuffer
);

Parameters

hdc [in]

A handle to the device context.

giFirst [in]

The first glyph index in the group of consecutive glyph indices.

cgi [in]

The number of glyph indices.

pgi [in]

A pointer to an array of glyph indices. If this parameter is not NULL, it is used instead of the giFirst parameter.

lpBuffer [out]

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

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero.

Remarks

The GetCharWidthI function processes a consecutive glyph indices if the pgi parameter is NULL with the giFirst parameter indicating the first glyph index to process and the cgi parameter indicating how many glyph indices to process. Otherwise the GetCharWidthI function processes the array of glyph indices pointed to by the pgi parameter with the cgi parameter indicating how many glyph indices to process.

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]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Fonts and Text Overview
Font and Text Functions
GetCharABCWidths
GetCharABCWidthsFloat
GetCharWidth32
GetCharWidthFloat

 

 

社群新增項目

顯示:
© 2014 Microsoft