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/d…
==============================================================================
--- 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: