[ros-diffs] [jimtabor] 22816: Wine port for DefWindowProcAW WM_NCCREATE help SetText.

jimtabor at svn.reactos.org jimtabor at svn.reactos.org
Tue Jul 4 00:36:09 CEST 2006


Author: jimtabor
Date: Tue Jul  4 02:36:09 2006
New Revision: 22816

URL: http://svn.reactos.org/svn/reactos?rev=22816&view=rev
Log:
Wine port for DefWindowProcAW WM_NCCREATE help SetText.

Modified:
    trunk/reactos/dll/win32/user32/windows/defwnd.c

Modified: trunk/reactos/dll/win32/user32/windows/defwnd.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/defwnd.c?rev=22816&r1=22815&r2=22816&view=diff
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/defwnd.c (original)
+++ trunk/reactos/dll/win32/user32/windows/defwnd.c Tue Jul  4 02:36:09 2006
@@ -1539,7 +1539,23 @@
     {
         case WM_NCCREATE:
         {
-            return TRUE;
+            ANSI_STRING AnsiString;
+            UNICODE_STRING UnicodeString;
+            LPCREATESTRUCTA cs = (LPCREATESTRUCTA)lParam;
+            /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP)
+             * may have child window IDs instead of window name */
+
+            if(cs->lpszName)
+            {
+              RtlInitAnsiString(&AnsiString, (LPSTR)cs->lpszName);
+              RtlAnsiStringToUnicodeString(&UnicodeString, &AnsiString, TRUE);
+              NtUserDefSetText(hWnd, &UnicodeString);
+              RtlFreeUnicodeString(&UnicodeString);
+            }
+            else
+              NtUserDefSetText(hWnd, NULL);
+
+            return (1);
         }
 
         case WM_GETTEXTLENGTH:
@@ -1618,7 +1634,16 @@
     {
         case WM_NCCREATE:
         {
-            return TRUE;
+            UNICODE_STRING UnicodeString;
+            LPCREATESTRUCTW cs = (LPCREATESTRUCTW)lParam;
+            /* check for string, as static icons, bitmaps (SS_ICON, SS_BITMAP)
+             * may have child window IDs instead of window name */
+
+            if(cs->lpszName)
+              RtlInitUnicodeString(&UnicodeString, (LPWSTR)cs->lpszName);
+
+            NtUserDefSetText( hWnd, (cs->lpszName ? &UnicodeString : NULL));
+            return (1);
         }
 
         case WM_GETTEXTLENGTH:




More information about the Ros-diffs mailing list