diff --git a/reactos/subsystems/win32/win32k/ntuser/window.c b/reactos/subsystems/win32/win32k/ntuser/window.c index e8f98f21b6d..4d978038e3f 100644 --- a/reactos/subsystems/win32/win32k/ntuser/window.c +++ b/reactos/subsystems/win32/win32k/ntuser/window.c @@ -3887,9 +3887,10 @@ NtUserSetWindowFNID(HWND hWnd, // From user land we only set these. if (fnID != FNID_DESTROY) { - if ( ((fnID < FNID_BUTTON) && (fnID > FNID_IME)) || + if ( ((fnID < FNID_BUTTON) && (fnID > FNID_GHOST)) || Wnd->fnid != 0 ) { + EngSetLastError(ERROR_INVALID_PARAMETER); RETURN( FALSE); } }