GdiGetCharDimensions(3w)

GdiGetCharDimensions3w

Usage

LONG GdiGetCharDimensions
(
HDC hdc,
LPTEXTMETRICW lptm,
LONG* height
)

Overview

Gets the average width of the characters in the English alphabet.

Params

hdc [In] Handle to the device context to measure on.

lptm [Out] Pointer to memory to store the text metrics into.

height [Out] On exit, the maximum height of characters in the English alphabet.

Returns

The average width of characters in the English alphabet.

Notes

This function is used by the dialog manager to get the size of a dialog unit. It should also be used by other pieces of code that need to know the size of a dialog unit in logical units without having access to the window handle of the dialog. Windows caches the font metrics from this function, but we don't and there doesn't appear to be an immediate advantage to do so.

Implementation

Declared in "wingdi.h".

Implemented in "dlls/gdi32/font.c".

Debug channel "font".

Releases

4 releases since Debian 4.0 (Etch); the text changed 3 times.

  1. 4.0
  2. 5.0
  3. 6.0
  4. 7

From libwine-dev 1.4.1-4 in Debian 7 (Wheezy). Parsed by carta from the page's man source.