public DRAWTEXTPARAMS(DRAWTEXTPARAMS original) { this.cbSize = Marshal.SizeOf(typeof(DRAWTEXTPARAMS)); this.iLeftMargin = original.iLeftMargin; this.iRightMargin = original.iRightMargin; this.iTabLength = original.iTabLength; }
private static unsafe partial int DrawTextExW( Gdi32.HDC hdc, char *lpchText, int cchText, ref RECT lprc, DT format, ref DRAWTEXTPARAMS lpdtp);
private static extern int DrawTextExW( IntPtr hdc, [MarshalAs(LPWStr)] string lpchText, int cchText, ref RECT lprc, DT format, ref DRAWTEXTPARAMS lpdtp );
public static unsafe int DrawTextExW( Gdi32.HDC hdc, ReadOnlySpan <char> lpchText, ref RECT lprc, DT format, ref DRAWTEXTPARAMS lpdtp) { lpdtp.cbSize = (uint)sizeof(DRAWTEXTPARAMS); fixed(char *c = lpchText) { return(DrawTextExW(hdc, c, lpchText.Length, ref lprc, format, ref lpdtp)); } }
public DRAWTEXTPARAMS(DRAWTEXTPARAMS original) {}
public DRAWTEXTPARAMS(DRAWTEXTPARAMS original) { this.iLeftMargin = original.iLeftMargin; this.iRightMargin = original.iRightMargin; this.iTabLength = original.iTabLength; }
public static extern int DrawTextEx(IntPtr hdc, StringBuilder lpchText, int cchText, ref RECT lprc, uint dwDTFormat, ref DRAWTEXTPARAMS lpDTParams);
public static int DrawTextExW(IHandle hdc, string lpchText, int cchText, ref RECT lprc, DT format, ref DRAWTEXTPARAMS lpdtp) { int result = DrawTextExW(hdc.Handle, lpchText, cchText, ref lprc, format, ref lpdtp); GC.KeepAlive(hdc); return(result); }
public static unsafe int DrawTextExW(IntPtr hdc, string lpchText, int cchText, ref RECT lprc, DT format, ref DRAWTEXTPARAMS lpdtp) { lpdtp.cbSize = (uint)sizeof(DRAWTEXTPARAMS); return(DrawTextExWInternal(hdc, lpchText, cchText, ref lprc, format, ref lpdtp)); }
public static void DrawString(IntPtr hDC, string text, Rectangle r, TextFormatFlags flags) { RECT rect = new RECT(r); DRAWTEXTPARAMS dtp = new DRAWTEXTPARAMS(); dtp.iLeftMargin = 0; dtp.iRightMargin = 0; dtp.iTabLength = 0; dtp.uiLengthDrawn = 0; DrawTextEx(hDC, text, text.Length, ref rect, (int)flags, dtp); }
public static int DrawTextExW(HandleRef hdc, string lpchText, int cchText, ref RECT lprc, TextFormatFlags format, ref DRAWTEXTPARAMS lpdtp) { int result = DrawTextExW(hdc.Handle, lpchText, cchText, ref lprc, format, ref lpdtp); GC.KeepAlive(hdc.Wrapper); return(result); }
public static extern int DrawTextExW(HandleRef hDC, string lpszString, int nCount, ref RECT lpRect, int nFormat, [In, Out] DRAWTEXTPARAMS lpDTParams);
public static extern int DrawTextEx(IntPtr hdc, StringBuilder lpchText, int cchText, ref RECT lprc, DT dwDTFormat, ref DRAWTEXTPARAMS lpDTParams);
static extern int DrawTextEx(SafeHandle hdc, StringBuilder lpchText, int cchText, ref RECT lprc, uint dwDTFormat, ref DRAWTEXTPARAMS lpDTParams);
private static extern int DrawTextExWInternal(IntPtr hdc, string lpchText, int cchText, ref RECT lprc, DT format, ref DRAWTEXTPARAMS lpdtp);
public DRAWTEXTPARAMS(DRAWTEXTPARAMS original) { }