From: Casper Hornstrup Date: Fri, 11 Jul 2003 17:08:44 +0000 (+0000) Subject: 2003-07-11 Casper S. Hornstrup X-Git-Tag: ReactOS-0.1.3~865 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=06a9aa1f74b997a6817558dd02dea3757fee2365 2003-07-11 Casper S. Hornstrup * lib/user32/controls/button.c (PB_Paint, GB_Paint): Declare variables before any statements are processed in the scope. * lib/user32/controls/combo.c (CBPaintButton): Ditto. * lib/user32/windows/accel.c (TranslateAcceleratorA): Ditto. * subsys/win32k/include/class.h (W32kGetClassLong): Fix prototype. * subsys/win32k/ntuser/class.c (W32kGetClassLong): Match prototype. * subsys/win32k/ntuser/windc.c (DceAllocDCE): Ditto. * subsys/win32k/ntuser/window.c (DestroyThreadWindows): Ditto. svn path=/trunk/; revision=5078 --- diff --git a/reactos/ChangeLog b/reactos/ChangeLog index 4c1e3a61ee7..662795f6500 100644 --- a/reactos/ChangeLog +++ b/reactos/ChangeLog @@ -1,3 +1,14 @@ +2003-07-11 Casper S. Hornstrup + + * lib/user32/controls/button.c (PB_Paint, GB_Paint): Declare variables + before any statements are processed in the scope. + * lib/user32/controls/combo.c (CBPaintButton): Ditto. + * lib/user32/windows/accel.c (TranslateAcceleratorA): Ditto. + * subsys/win32k/include/class.h (W32kGetClassLong): Fix prototype. + * subsys/win32k/ntuser/class.c (W32kGetClassLong): Match prototype. + * subsys/win32k/ntuser/windc.c (DceAllocDCE): Ditto. + * subsys/win32k/ntuser/window.c (DestroyThreadWindows): Ditto. + 2003-07-11 Casper S. Hornstrup * tools/rgenstat/rgenstat.c (process_directory): Fix building on Windows. diff --git a/reactos/lib/user32/controls/button.c b/reactos/lib/user32/controls/button.c index 612003be127..d857cfb5516 100644 --- a/reactos/lib/user32/controls/button.c +++ b/reactos/lib/user32/controls/button.c @@ -1,4 +1,4 @@ -/* $Id: button.c,v 1.4 2003/06/27 17:49:07 chorns Exp $ +/* $Id: button.c,v 1.5 2003/07/11 17:08:44 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS User32 @@ -693,6 +693,7 @@ static void PB_Paint( HWND hwnd, HDC hDC, UINT action ) LONG state = get_button_state( hwnd ); LONG style = GetWindowLongA( hwnd, GWL_STYLE ); BOOL pushedState = (state & BUTTON_HIGHLIGHTED); + UINT uState; GetClientRect( hwnd, &rc ); @@ -709,7 +710,7 @@ static void PB_Paint( HWND hwnd, HDC hDC, UINT action ) InflateRect( &rc, -1, -1 ); } - UINT uState = DFCS_BUTTONPUSH | DFCS_ADJUSTRECT; + uState = DFCS_BUTTONPUSH | DFCS_ADJUSTRECT; if (style & BS_FLAT) uState |= DFCS_MONO; @@ -922,6 +923,7 @@ static void GB_Paint( HWND hwnd, HDC hDC, UINT action ) HBRUSH hbr; HFONT hFont; UINT dtFlags; + TEXTMETRICW tm; LONG style = GetWindowLongA( hwnd, GWL_STYLE ); if (action != ODA_DRAWENTIRE) return; @@ -934,7 +936,7 @@ static void GB_Paint( HWND hwnd, HDC hDC, UINT action ) (WPARAM)hDC, (LPARAM)hwnd); GetClientRect( hwnd, &rc); - TEXTMETRICW tm; + rcFrame = rc; GetTextMetricsW (hDC, &tm); diff --git a/reactos/lib/user32/controls/combo.c b/reactos/lib/user32/controls/combo.c index e6d28022657..4465f95a39a 100644 --- a/reactos/lib/user32/controls/combo.c +++ b/reactos/lib/user32/controls/combo.c @@ -682,10 +682,12 @@ static void CBPaintButton( HDC hdc, RECT rectButton) { + UINT buttonState; + if( lphc->wState & CBF_NOREDRAW ) return; - UINT buttonState = DFCS_SCROLLCOMBOBOX; + buttonState = DFCS_SCROLLCOMBOBOX; if (lphc->wState & CBF_BUTTONDOWN) { diff --git a/reactos/lib/user32/windows/accel.c b/reactos/lib/user32/windows/accel.c index e7e820b8a92..b0c91e3eb79 100644 --- a/reactos/lib/user32/windows/accel.c +++ b/reactos/lib/user32/windows/accel.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: accel.c,v 1.8 2003/07/10 21:04:31 chorns Exp $ +/* $Id: accel.c,v 1.9 2003/07/11 17:08:44 chorns Exp $ * * PROJECT: ReactOS user32.dll * FILE: lib/user32/windows/input.c @@ -372,10 +372,11 @@ int WINAPI TranslateAcceleratorA(HWND hWnd, HACCEL hAccTable, LPMSG lpMsg) MSG mCopy = *lpMsg; CHAR cChar; WCHAR wChar; + NTSTATUS nErrCode; if(!U32IsValidAccelMessage(lpMsg->message)) return 0; - NTSTATUS nErrCode = + nErrCode = RtlMultiByteToUnicodeN(&wChar, sizeof(wChar), NULL, &cChar, sizeof(cChar)); if(!nErrCode) diff --git a/reactos/subsys/win32k/include/class.h b/reactos/subsys/win32k/include/class.h index 5e301197499..f83c199d895 100644 --- a/reactos/subsys/win32k/include/class.h +++ b/reactos/subsys/win32k/include/class.h @@ -38,7 +38,7 @@ W32kCreateClass(LPWNDCLASSEXW lpwcx, BOOL bUnicodeClass); struct _WINDOW_OBJECT; ULONG FASTCALL -W32kGetClassLong(struct _WINDOW_OBJECT* WindowObject, ULONG Offset); +W32kGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset); #endif /* __WIN32K_CLASS_H */ diff --git a/reactos/subsys/win32k/ntuser/class.c b/reactos/subsys/win32k/ntuser/class.c index 4175dbc7533..172c49ec9da 100644 --- a/reactos/subsys/win32k/ntuser/class.c +++ b/reactos/subsys/win32k/ntuser/class.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: class.c,v 1.18 2003/06/20 16:26:14 ekohl Exp $ +/* $Id: class.c,v 1.19 2003/07/11 17:08:44 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -282,7 +282,7 @@ NtUserRegisterClassExWOW(LPWNDCLASSEXW lpwcx, } ULONG FASTCALL -W32kGetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset) +W32kGetClassLong(struct _WINDOW_OBJECT *WindowObject, ULONG Offset) { LONG Ret; switch (Offset) diff --git a/reactos/subsys/win32k/ntuser/windc.c b/reactos/subsys/win32k/ntuser/windc.c index a6bcb6950c4..8904fc18247 100644 --- a/reactos/subsys/win32k/ntuser/windc.c +++ b/reactos/subsys/win32k/ntuser/windc.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: windc.c,v 1.13 2003/07/10 00:24:04 chorns Exp $ +/* $Id: windc.c,v 1.14 2003/07/11 17:08:44 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -274,7 +274,7 @@ NtUserGetDC(HWND hWnd) return NtUserGetDCEx(hWnd, NULL, NULL == hWnd ? DCX_CACHE | DCX_WINDOW : DCX_USESTYLE); } -DCE * FASTCALL DceAllocDCE(HWND hWnd, DCE_TYPE Type) +PDCE FASTCALL DceAllocDCE(HWND hWnd, DCE_TYPE Type) { HDCE DceHandle; DCE* Dce; diff --git a/reactos/subsys/win32k/ntuser/window.c b/reactos/subsys/win32k/ntuser/window.c index 722b0468354..e546dcf2219 100644 --- a/reactos/subsys/win32k/ntuser/window.c +++ b/reactos/subsys/win32k/ntuser/window.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: window.c,v 1.62 2003/07/10 00:24:04 chorns Exp $ +/* $Id: window.c,v 1.63 2003/07/11 17:08:44 chorns Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -1197,7 +1197,7 @@ NtUserDestroyWindow(HWND Wnd) } VOID FASTCALL -DestroyThreadWindows(PETHREAD Thread) +DestroyThreadWindows(struct _ETHREAD *Thread) { PLIST_ENTRY LastHead; PW32PROCESS Win32Process;