* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: paint.c,v 1.10 2003/03/18 09:16:44 gvg Exp $
+/* $Id: paint.c,v 1.11 2003/03/24 23:08:51 rcampbell Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
UpdateWindow(
HWND hWnd)
{
- return FALSE;
+ return NtUserUpdateWindow( hWnd );
}
WINBOOL
STDCALL
-/* $Id: window.c,v 1.38 2003/03/24 01:36:10 rcampbell Exp $
+/* $Id: window.c,v 1.39 2003/03/24 23:08:51 rcampbell Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
uExStyle = Window->ExStyle;
pWinPos.hwnd = hWnd;
- /* FIXME: Is this the correct behavior? */
- if (X)
- {
- pWinPos.x = X;
- }
- else
- {
- pWinPos.x = Window->WindowRect.left;
- }
- if (Y)
- {
- pWinPos.y = Y;
- }
- else
- {
- pWinPos.y = Window->WindowRect.top;
- }
-
- if (nWidth)
- {
+ pWinPos.x = X;
+ pWinPos.y = Y;
+ if (nWidth > NtUserGetSystemMetrics(SM_CXMIN))
pWinPos.cx = pWinPos.x + nWidth;
- }
else
- {
- pWinPos.cx = pWinPos.x + (Window->WindowRect.right - Window->WindowRect.left);
- }
- if (nHeight)
- {
- pWinPos.cy = pWinPos.y + nHeight;
- }
+ pWinPos.cx = pWinPos.x + NtUserGetSystemMetrics(SM_CXMIN);
+
+ if (nHeight > NtUserGetSystemMetrics(SM_CYMIN))
+ pWinPos.cy = pWinPos.x + nHeight;
else
- {
- pWinPos.cy = pWinPos.y + (Window->WindowRect.bottom - Window->WindowRect.top);
- }
-
+ pWinPos.cy = pWinPos.y + NtUserGetSystemMetrics(SM_CYMIN);
NtUserSendMessage(hWnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)&pWinPos);
Window->WindowRect.top = Window->ClientRect.top = pWinPos.y;
Window->ClientRect.right -= NtUserGetSystemMetrics(SM_CXSIZEFRAME);
}
if (uStyle & WS_CAPTION)
- Window->ClientRect.top += NtUserGetSystemMetrics(SM_CYCAPTION) + 1;
+ Window->ClientRect.top += NtUserGetSystemMetrics(SM_CYCAPTION);
if ( Window->Class->Class.lpszMenuName)
{
Window->ClientRect.top += NtUserGetSystemMetrics(SM_CYMENU);
return 0;
}
+BOOL STDCALL NtUserUpdateWindow( HWND hWnd )
+{
+ PWINDOW_OBJECT pWindow = W32kGetWindowObject( hWnd);
+
+ if (!pWindow)
+ return FALSE;
+ if (pWindow->UpdateRegion)
+ NtUserSendMessage( hWnd, WM_PAINT,0,0);
+
+ return TRUE;
+}
+
DWORD STDCALL
NtUserUpdateLayeredWindow(DWORD Unknown0,
DWORD Unknown1,