Resubmit SetWindowTextA() patch
Jason Campbell
rexregis at verizon.net
Mon Jun 6 12:32:08 CDT 2005
C++ style comments aren't allowed in wine, please resubmit with /* */
OK, fixed that. Also found out since then that a number of other apps do
the same thing.
MSDN says "To set the text of a control in another process, send the
WM_SETTEXT message directly instead of calling SetWindowText."
That's what we're doing anyways:
return (BOOL)SendMessageA( hwnd, WM_SETTEXT, 0, (LPARAM)lpString );
So maybe the whole if (!WIN_IsCurrentProcess) can just be removed?
Jason Campbell
jason at sysk-net.com
=====================================================================
--- wine-cvs/dlls/user/win.c 2005-05-14 14:49:19.000000000 -0400
+++ wine-work/dlls/user/win.c 2005-06-06 12:51:45.000000000 -0400
@@ -2293,9 +2293,12 @@
}
if (!WIN_IsCurrentProcess( hwnd ))
{
+/*
FIXME( "cannot set text %s of other process window %p\n",
debugstr_a(lpString), hwnd );
SetLastError( ERROR_ACCESS_DENIED );
return FALSE;
+*/
+ FIXME( "not allowed by MSDN but some apps programmed this way" );
}
return (BOOL)SendMessageA( hwnd, WM_SETTEXT, 0, (LPARAM)lpString );
}
More information about the wine-patches
mailing list