public static extern int WriteConsoleOutput(HANDLE hConsoleOutput, ref CHAR_INFO lpBuffer, COORD dwBufferSize, COORD dwBufferCoord, ref SMALL_RECT lpWriteRegion);
public static extern int ScrollConsoleScreenBuffer(HANDLE hConsoleOutput, ref SMALL_RECT lpScrollRectangle, ref SMALL_RECT lpClipRectangle, COORD dwDestinationOrigin, ref CHAR_INFO lpFill);
public void Scroll(Rectangle rect, Rectangle? clip, Point origin) { var ci = new CHAR_INFO(); ci.Char = ' '; Scroll(rect, clip, origin, ci); }
public void Scroll(Rectangle rect, Rectangle? clip, Point origin, CHAR_INFO fill) { var r = new SMALL_RECT() { Left = (short)rect.Left, Top = (short)rect.Top, Right = (short)rect.Right, Bottom = (short)rect.Bottom }; var d = new COORD() { X = (short)origin.X, Y = (short)(origin.Y) //!!! }; Api.Win32Check(Api.ScrollConsoleScreenBuffer(Handle, ref r , IntPtr.Zero, d.ToInt32(), ref fill)); }
public static extern bool ScrollConsoleScreenBuffer(SafeHandle h, ref SMALL_RECT rect, IntPtr clip, Int32 dest, ref CHAR_INFO fill);