Author: janderwald
Date: Tue Jun 27 14:02:33 2006
New Revision: 22660
URL:
http://svn.reactos.org/svn/reactos?rev=22660&view=rev
Log:
fix displaying status bar when notepad was resized
bug report by Apal
patch by Apal && w3seek
fixes bug 1625
Modified:
trunk/reactos/base/applications/notepad/main.c
Modified: trunk/reactos/base/applications/notepad/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
==============================================================================
--- trunk/reactos/base/applications/notepad/main.c (original)
+++ trunk/reactos/base/applications/notepad/main.c Tue Jun 27 14:02:33 2006
@@ -341,9 +341,33 @@
break;
case WM_SIZE:
- SetWindowPos(Globals.hEdit, NULL, 0, 0, LOWORD(lParam), HIWORD(lParam),
- SWP_NOOWNERZORDER | SWP_NOZORDER);
- break;
+ {
+ 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;
+ }
case WM_SETFOCUS:
SetFocus(Globals.hEdit);