The GetCharWidth function retrieves the widths, in logical coordinates, of consecutive characters in a specified range from the current font.
GetCharWidth is maintained for compatibility with 16-bit versions of Windows. Win32-based applications should call the GetCharWidth32 function, which provides more accurate results.
BOOL GetCharWidth(
HDC hdc, |
// handle of device context |
UINT iFirstChar, |
// first character in range to query |
UINT iLastChar, |
// last character in range to query |
LPINT lpBuffer |
// address of buffer for widths |
); |
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
The range is inclusive; that is, the returned widths include the widths of the characters specified by the iFirstChar and iLastChar parameters.
If a character does not exist in the current font, it is assigned the width of the default character.
GetCharABCWidths, GetCharABCWidthsFloat, GetCharWidth32, GetCharWidthFloat
See:
file: /Techref/os/win/api/win32/func/src/f27_19.htm, 3KB, , updated: 2001/6/26 09:43, local time: 2024/11/9 08:07,
18.191.87.134:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://linistepper.com/techref/os/win/api/win32/func/src/f27_19.htm"> GetCharWidth</A> |
Did you find what you needed? |