mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:25:39 +00:00
scroll the console properly instead of repainting it
svn path=/trunk/; revision=19719
This commit is contained in:
parent
72a514b6e6
commit
8da9b240f0
1 changed files with 9 additions and 6 deletions
|
@ -488,7 +488,7 @@ GuiWriteStream(PCSRSS_CONSOLE Console, RECT *Region, LONG CursorStartX, LONG Cur
|
||||||
PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA) Console->PrivateData;
|
PGUI_CONSOLE_DATA GuiData = (PGUI_CONSOLE_DATA) Console->PrivateData;
|
||||||
PCSRSS_SCREEN_BUFFER Buff = Console->ActiveBuffer;
|
PCSRSS_SCREEN_BUFFER Buff = Console->ActiveBuffer;
|
||||||
LONG CursorEndX, CursorEndY;
|
LONG CursorEndX, CursorEndY;
|
||||||
RECT Source, ScrollRect;
|
RECT ScrollRect;
|
||||||
|
|
||||||
if (NULL == Console->hWindow || NULL == GuiData)
|
if (NULL == Console->hWindow || NULL == GuiData)
|
||||||
{
|
{
|
||||||
|
@ -497,16 +497,19 @@ GuiWriteStream(PCSRSS_CONSOLE Console, RECT *Region, LONG CursorStartX, LONG Cur
|
||||||
|
|
||||||
if (0 != ScrolledLines)
|
if (0 != ScrolledLines)
|
||||||
{
|
{
|
||||||
Source.left = 0;
|
|
||||||
Source.top = ScrolledLines;
|
|
||||||
Source.right = Console->Size.X - 1;
|
|
||||||
Source.bottom = ScrolledLines + Region->top - 1;
|
|
||||||
ScrollRect.left = 0;
|
ScrollRect.left = 0;
|
||||||
ScrollRect.top = 0;
|
ScrollRect.top = 0;
|
||||||
ScrollRect.right = Console->Size.X * GuiData->CharWidth;
|
ScrollRect.right = Console->Size.X * GuiData->CharWidth;
|
||||||
ScrollRect.bottom = Region->top * GuiData->CharHeight;
|
ScrollRect.bottom = Region->top * GuiData->CharHeight;
|
||||||
|
|
||||||
InvalidateRect(Console->hWindow, &ScrollRect, FALSE);
|
ScrollWindowEx(Console->hWindow,
|
||||||
|
0,
|
||||||
|
-(ScrolledLines * GuiData->CharHeight),
|
||||||
|
&ScrollRect,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
NULL,
|
||||||
|
SW_INVALIDATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
GuiIntDrawRegion(GuiData, Console->hWindow, Region);
|
GuiIntDrawRegion(GuiData, Console->hWindow, Region);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue