GetCharWidth (gdi32)
Last changed: anonymous

.
Summary

C# Signature:

[DllImport("gdi32.dll")]

static extern bool GetCharABCWidths(IntPtr hdc, uint uFirstChar,uint uLastChar, ref ABC lpabc);

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

     [DllImport("gdi32.dll")]
     static extern bool GetCharABCWidths(IntPtr hdc, uint uFirstChar,
    uint uLastChar, ref  ABC lpabc);

     [StructLayout(LayoutKind.Sequential)]
     public struct ABC
     { /* abc */
       public int abcA;
       public uint abcB;
       public int abcC;
      }

      /* Declare an array of 3 struct ABC */
      ABC[] abc = { new ABC(), new ABC(), new ABC() };

      /* put the adress of the first cell of the struct abc array */
      bool ret = GetCharABCWidths(Hdc, 'A', 'C', ref abc[0]);

Alternative Managed API:

Do you know one? Please contribute it!

Documentation