GetTextMetrics (gdi32)
Last changed: Szymon Katra-95.49.0.3

.
Summary

C# Signature:

[DllImport("gdi32.dll")]
static extern bool GetTextMetrics(IntPtr hdc, out TEXTMETRIC lptm);

User-Defined Types:

[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Auto)]

struct TEXTMETRIC

{

    int tmHeight;
    int tmAscent;
    int tmDescent;
    int tmInternalLeading;
    int tmExternalLeading;
    int tmAveCharWidth;
    int tmMaxCharWidth;
    int tmWeight;
    int tmOverhang;
    int tmDigitizedAspectX;
    int tmDigitizedAspectY;

    char tmFirstChar;
    char tmLastChar;
    char tmDefaultChar;
    char tmBreakChar;

    byte tmItalic;
    byte tmUnderlined;
    byte tmStruckOut;
    byte tmPitchAndFamily;
    byte tmCharSet;

}

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation