diff --git a/reactos/lib/user32/windows/message.c b/reactos/lib/user32/windows/message.c index b4db4383424..ac297024045 100644 --- a/reactos/lib/user32/windows/message.c +++ b/reactos/lib/user32/windows/message.c @@ -1,4 +1,4 @@ -/* $Id: message.c,v 1.34 2004/01/26 08:44:51 weiden Exp $ +/* $Id: message.c,v 1.35 2004/01/28 20:54:30 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS user32.dll @@ -703,6 +703,7 @@ SendMessageW(HWND Wnd, NTUSERSENDMESSAGEINFO Info; LRESULT Result; + Info.Ansi = FALSE; Result = NtUserSendMessage(Wnd, Msg, wParam, lParam, &Info); if (! Info.HandledByKernel) { @@ -734,6 +735,7 @@ SendMessageA(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam) return FALSE; } + Info.Ansi = TRUE; Result = NtUserSendMessage(UcMsg.hwnd, UcMsg.message, UcMsg.wParam, UcMsg.lParam, &Info); if (! Info.HandledByKernel) diff --git a/reactos/subsys/win32k/ntuser/message.c b/reactos/subsys/win32k/ntuser/message.c index 8e4cb717764..9f177249768 100644 --- a/reactos/subsys/win32k/ntuser/message.c +++ b/reactos/subsys/win32k/ntuser/message.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: message.c,v 1.47 2004/01/27 13:21:35 gvg Exp $ +/* $Id: message.c,v 1.48 2004/01/28 20:54:30 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -914,9 +914,14 @@ NtUserSendMessage(HWND Wnd, { if (0xFFFF0000 != ((DWORD) Window->WndProcA & 0xFFFF0000)) { - /* Both Unicode and Ansi winprocs are real */ - Info.Ansi = ! Window->Unicode; - Info.Proc = (Window->Unicode ? Window->WndProcW : Window->WndProcA); + /* Both Unicode and Ansi winprocs are real, see what usermode prefers */ + Status = MmCopyFromCaller(&(Info.Ansi), &(UnsafeInfo->Ansi), + sizeof(BOOL)); + if (! NT_SUCCESS(Status)) + { + Info.Ansi = ! Window->Unicode; + } + Info.Proc = (Info.Ansi ? Window->WndProcA : Window->WndProcW); } else {