[ros-diffs] [tkreuzer] 38856: user32: sync icontitle.c with Wine 1.1.13 Alexandre Julliard <julliard at winehq.org> user32: Store the builtin class names in Unicode. Rob Shearman <rob at codeweavers.com> user32: Fix incorrect character count passed to GetWindowTextW in ICONTITLE_Paint.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Sat Jan 17 22:45:01 CET 2009


Author: tkreuzer
Date: Sat Jan 17 15:45:00 2009
New Revision: 38856

URL: http://svn.reactos.org/svn/reactos?rev=38856&view=rev
Log:
user32: sync icontitle.c with Wine 1.1.13

Alexandre Julliard <julliard at winehq.org>
user32: Store the builtin class names in Unicode.

Rob Shearman <rob at codeweavers.com>
user32: Fix incorrect character count passed to GetWindowTextW in ICONTITLE_Paint.

Modified:
    trunk/reactos/dll/win32/user32/controls/icontitle.c

Modified: trunk/reactos/dll/win32/user32/controls/icontitle.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/controls/icontitle.c?rev=38856&r1=38855&r2=38856&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/controls/icontitle.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/controls/icontitle.c [iso-8859-1] Sat Jan 17 15:45:00 2009
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
 #include <user32.h>
@@ -37,7 +37,7 @@
  */
 const struct builtin_class_descr ICONTITLE_builtin_class =
 {
-    ICONTITLE_CLASS_ATOM, /* name */
+    (LPCWSTR)ICONTITLE_CLASS_ATOM, /* name */
     0,                    /* style */
     NULL,                 /* procA (winproc is Unicode only) */
     IconTitleWndProc,     /* procW */
@@ -60,11 +60,11 @@
 
     if (!IsWindowEnabled(owner)) style |= WS_DISABLED;
     if( GetWindowLongA( owner, GWL_STYLE ) & WS_CHILD )
-	hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_ATOM, NULL,
+	hWnd = CreateWindowExA( 0, (LPCSTR)ICONTITLE_CLASS_ATOM, NULL,
                                 style | WS_CHILD, 0, 0, 1, 1,
                                 GetParent(owner), 0, instance, NULL );
     else
-	hWnd = CreateWindowExA( 0, ICONTITLE_CLASS_ATOM, NULL,
+	hWnd = CreateWindowExA( 0, (LPCSTR)ICONTITLE_CLASS_ATOM, NULL,
                                 style, 0, 0, 1, 1,
                                 owner, 0, instance, NULL );
     WIN_SetOwner( hWnd, owner );  /* MDI depends on this */
@@ -175,7 +175,7 @@
     {
 	WCHAR buffer[80];
 
-        INT length = GetWindowTextW( owner, buffer, sizeof(buffer) );
+        INT length = GetWindowTextW( owner, buffer, sizeof(buffer)/sizeof(buffer[0]) );
         SetTextColor( hDC, textColor );
         SetBkMode( hDC, TRANSPARENT );
 
@@ -222,8 +222,8 @@
             if (wParam) ICONTITLE_SetTitlePos( hWnd, owner );
 	     return 0;
 	case WM_ERASEBKGND:
-            if( GetWindowLongA( owner, GWL_STYLE ) & WS_CHILD )
-                lParam = SendMessageA( owner, WM_ISACTIVEICON, 0, 0 );
+            if( GetWindowLongW( owner, GWL_STYLE ) & WS_CHILD )
+                lParam = SendMessageW( owner, WM_ISACTIVEICON, 0, 0 );
             else
                 lParam = (owner == GetActiveWindow());
             if( ICONTITLE_Paint( hWnd, owner, (HDC)wParam, (BOOL)lParam ) )



More information about the Ros-diffs mailing list