patch by Jonathon Wilson - fix bug in SetClassLong and SetWindowLong

svn path=/trunk/; revision=5565
This commit is contained in:
Royce Mitchell III 2003-08-14 01:38:19 +00:00
parent 238a317934
commit 2f9bb4b28a
2 changed files with 6 additions and 2 deletions

View file

@ -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.29 2003/08/13 20:24:05 chorns Exp $
/* $Id: class.c,v 1.30 2003/08/14 01:38:19 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -502,11 +502,13 @@ W32kSetClassLong(PWINDOW_OBJECT WindowObject, ULONG Offset, LONG dwNewLong, BOOL
{
WindowObject->Class->lpfnWndProcA = (WNDPROC)dwNewLong;
WindowObject->Class->lpfnWndProcW = (WNDPROC)dwNewLong+0x80000000;
WindowObject->Class->Unicode = FALSE;
}
else
{
WindowObject->Class->lpfnWndProcW = (WNDPROC)dwNewLong;
WindowObject->Class->lpfnWndProcA = (WNDPROC)dwNewLong+0x80000000;
WindowObject->Class->Unicode = TRUE;
}
break;
}

View file

@ -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.90 2003/08/13 20:24:05 chorns Exp $
/* $Id: window.c,v 1.91 2003/08/14 01:38:19 royce Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -1936,12 +1936,14 @@ NtUserSetWindowLong(HWND hWnd, DWORD Index, LONG NewValue, BOOL Ansi)
OldValue = (LONG) WindowObject->WndProcA;
WindowObject->WndProcA = (WNDPROC) NewValue;
WindowObject->WndProcW = (WNDPROC) NewValue+0x80000000;
WindowObject->Unicode = FALSE;
}
else
{
OldValue = (LONG) WindowObject->WndProcW;
WindowObject->WndProcW = (WNDPROC) NewValue;
WindowObject->WndProcA = (WNDPROC) NewValue+0x80000000;
WindowObject->Unicode = TRUE;
}
break;