mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 06:33:01 +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;
|
h = clientRect.bottom - 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
RECT statusBarRect0;
|
INT statusBarHeight = 0;
|
||||||
int statusBarBorders[3];
|
if (::IsWindowVisible(hStatusBar))
|
||||||
if (::IsWindow(hStatusBar))
|
|
||||||
{
|
{
|
||||||
::SendMessage(hStatusBar, SB_GETRECT, 0, (LPARAM)&statusBarRect0);
|
RECT Rect;
|
||||||
::SendMessage(hStatusBar, SB_GETBORDERS, 0, (LPARAM)&statusBarBorders);
|
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())
|
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())
|
if (paletteWindow.IsWindow())
|
||||||
paletteWindow.MoveWindow(x, 9, 255, 32, TRUE);
|
paletteWindow.MoveWindow(x, 9, 255, 32, TRUE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue