mirror of
https://github.com/reactos/reactos.git
synced 2025-06-05 09:20:30 +00:00
fix displaying status bar when notepad was resized
bug report by Apal patch by Apal && w3seek fixes bug 1625 svn path=/trunk/; revision=22660
This commit is contained in:
parent
4903b28f61
commit
94ad288b3c
1 changed files with 26 additions and 2 deletions
|
@ -341,9 +341,33 @@ static LRESULT WINAPI NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_SIZE:
|
case WM_SIZE:
|
||||||
SetWindowPos(Globals.hEdit, NULL, 0, 0, LOWORD(lParam), HIWORD(lParam),
|
{
|
||||||
SWP_NOOWNERZORDER | SWP_NOZORDER);
|
if (Globals.bShowStatusBar)
|
||||||
|
{
|
||||||
|
RECT rcStatusBar;
|
||||||
|
HDWP hdwp;
|
||||||
|
|
||||||
|
if (!GetWindowRect(Globals.hStatusBar, &rcStatusBar))
|
||||||
|
break;
|
||||||
|
|
||||||
|
hdwp = BeginDeferWindowPos(2);
|
||||||
|
if (hdwp == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
|
hdwp = DeferWindowPos(hdwp, Globals.hEdit, NULL, 0, 0, LOWORD(lParam), HIWORD(lParam) - (rcStatusBar.bottom - rcStatusBar.top), SWP_NOZORDER | SWP_NOMOVE);
|
||||||
|
if (hdwp == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
|
hdwp = DeferWindowPos(hdwp, Globals.hStatusBar, NULL, 0, 0, LOWORD(lParam), LOWORD(wParam), SWP_NOZORDER);
|
||||||
|
|
||||||
|
if (hdwp != NULL)
|
||||||
|
EndDeferWindowPos(hdwp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
SetWindowPos(Globals.hEdit, NULL, 0, 0, LOWORD(lParam), HIWORD(lParam), SWP_NOZORDER | SWP_NOMOVE);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case WM_SETFOCUS:
|
case WM_SETFOCUS:
|
||||||
SetFocus(Globals.hEdit);
|
SetFocus(Globals.hEdit);
|
||||||
|
|
Loading…
Reference in a new issue