[DllImport("coredll.dll")]
public static extern bool GetTextExtentExPointW(IntPtr hDc, string lpString, int nLength, int nMaxExtent, int[] lpnFit, int[] alpDx, out Size size);
None.
Do you know one? Please contribute it!
None.
Set lpnFit to null to ignore nMaxExtent.
Setting lpnFit and alpDx to null will get you the functionality of GetTextExtentPoint.
...
using(Graphics g = ctrl.CreateGraphics())
{
IntPtr hDC = g.GetHdc();
string testString = "Hello p/Invoke";
int width = 30;
int[] fi = new int[1];
int[] charExtents = new int[testString.Length];
Size sz;
GetTextExtentExPointW(hDC, testString, testString.Length, width, fit, charExtents, out sz);
...
g.ReleaseHdc(hDC);
}
...
Please add some!