From 28777b68e7479e6515231fc849c61b3748da8712 Mon Sep 17 00:00:00 2001 From: Rr42 Date: Mon, 18 Jun 2018 13:41:24 +0530 Subject: Fixed bug in FillRect --- ldmicro/maincontrols.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'ldmicro/maincontrols.cpp') diff --git a/ldmicro/maincontrols.cpp b/ldmicro/maincontrols.cpp index a08696f..9ed011a 100644 --- a/ldmicro/maincontrols.cpp +++ b/ldmicro/maincontrols.cpp @@ -885,10 +885,33 @@ void GenerateIoListDontLoseSelection(void) //----------------------------------------------------------------------------- void MainWindowResized(void) { + RECT main; + GetClientRect(DrawWindow, &main); + + RECT status; + GetWindowRect(StatusBar, &status); + int statusHeight = status.bottom - status.top; + + // MoveWindow(StatusBar, 0, main.bottom - statusHeight, main.right, + // statusHeight, TRUE); + // Make sure that the I/O list can't disappear entirely. if(IoListHeight < 30) { IoListHeight = 30; } + IoListTop = main.bottom ;//- IoListHeight - statusHeight; + + // Make sure that we can't drag the top of the I/O list above the + // bottom of the menu bar, because it then becomes inaccessible. + if(IoListTop < 5) { + IoListHeight = main.bottom - statusHeight - 5; + IoListTop = main.bottom - IoListHeight - statusHeight; + } + // MoveWindow(IoList, 0, IoListTop, main.right, IoListHeight, TRUE); + + RefreshScrollbars(); + + InvalidateRect(DrawWindow, NULL, FALSE); } //----------------------------------------------------------------------------- -- cgit