mirror of
https://github.com/reactos/reactos.git
synced 2025-04-05 13:11:22 +00:00
[MSPAINT] Fix use of uninitialized variable on startup (#5140)
There was an exception in starting up of mspaint of Visual Studio 2019 build. CORE-18594, CORE-18867
This commit is contained in:
parent
29d0deef13
commit
02c647802f
1 changed files with 8 additions and 7 deletions
|
@ -72,17 +72,18 @@ void CMainWindow::alignChildrenToMainWindow()
|
|||
h = clientRect.bottom - 3;
|
||||
}
|
||||
|
||||
RECT statusBarRect0;
|
||||
int statusBarBorders[3];
|
||||
if (::IsWindow(hStatusBar))
|
||||
INT statusBarHeight = 0;
|
||||
if (::IsWindowVisible(hStatusBar))
|
||||
{
|
||||
::SendMessage(hStatusBar, SB_GETRECT, 0, (LPARAM)&statusBarRect0);
|
||||
::SendMessage(hStatusBar, SB_GETBORDERS, 0, (LPARAM)&statusBarBorders);
|
||||
RECT Rect;
|
||||
INT borders[3];
|
||||
::SendMessage(hStatusBar, SB_GETRECT, 0, (LPARAM)&Rect);
|
||||
::SendMessage(hStatusBar, SB_GETBORDERS, 0, (LPARAM)&borders);
|
||||
statusBarHeight = Rect.bottom - Rect.top + borders[1];
|
||||
}
|
||||
int statusBarHeight = statusBarRect0.bottom - statusBarRect0.top + statusBarBorders[1];
|
||||
|
||||
if (scrollboxWindow.IsWindow())
|
||||
scrollboxWindow.MoveWindow(x, y, w, ::IsWindowVisible(hStatusBar) ? h - statusBarHeight : h, TRUE);
|
||||
scrollboxWindow.MoveWindow(x, y, w, h - statusBarHeight, TRUE);
|
||||
if (paletteWindow.IsWindow())
|
||||
paletteWindow.MoveWindow(x, 9, 255, 32, TRUE);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue