Only return valid values from WM_NOTIFYFORMAT with NF_QUERY in DefWindowProc
authorThomas Bluemel <thomas@reactsoft.com>
Mon, 30 Jul 2007 15:16:15 +0000 (15:16 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Mon, 30 Jul 2007 15:16:15 +0000 (15:16 +0000)
svn path=/trunk/; revision=28046

reactos/dll/win32/user32/windows/defwnd.c

index aa6de07..5931aea 100644 (file)
@@ -1493,14 +1493,9 @@ User32DefWindowProc(HWND hWnd,
 
         case WM_NOTIFYFORMAT:
         {
-            if (IsWindowUnicode(hWnd))
-            {
-                return(NFR_UNICODE);
-            }
-            else
-            {
-                return(NFR_ANSI);
-            }
+            if (lParam == NF_QUERY)
+                return IsWindowUnicode(hWnd) ? NFR_UNICODE : NFR_ANSI;
+            break;
         }
 
         case WM_SETICON: