Commit c31954df authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move IsWindowEnabled implementation from user32.

parent d32d3b4f
......@@ -915,14 +915,9 @@ BOOL WINAPI EnableWindow( HWND hwnd, BOOL enable )
/***********************************************************************
* IsWindowEnabled (USER32.@)
*/
BOOL WINAPI IsWindowEnabled(HWND hWnd)
BOOL WINAPI IsWindowEnabled( HWND hwnd )
{
LONG ret;
SetLastError(NO_ERROR);
ret = GetWindowLongW( hWnd, GWL_STYLE );
if (!ret && GetLastError() != NO_ERROR) return FALSE;
return !(ret & WS_DISABLED);
return NtUserCallHwnd( hwnd, NtUserIsWindowEnabled );
}
/***********************************************************************
......
......@@ -807,6 +807,17 @@ BOOL is_window_unicode( HWND hwnd )
return ret;
}
/* see IsWindowEnabled */
static BOOL is_window_enabled( HWND hwnd )
{
LONG ret;
SetLastError( NO_ERROR );
ret = get_window_long( hwnd, GWL_STYLE );
if (!ret && GetLastError() != NO_ERROR) return FALSE;
return !(ret & WS_DISABLED);
}
/* see GetWindowDpiAwarenessContext */
DPI_AWARENESS_CONTEXT get_window_dpi_awareness_context( HWND hwnd )
{
......@@ -4979,6 +4990,8 @@ ULONG_PTR WINAPI NtUserCallHwnd( HWND hwnd, DWORD code )
return get_server_window_text( hwnd, NULL, 0 );
case NtUserIsWindow:
return is_window( hwnd );
case NtUserIsWindowEnabled:
return is_window_enabled( hwnd );
case NtUserIsWindowUnicode:
return is_window_unicode( hwnd );
case NtUserIsWindowVisible:
......
......@@ -198,6 +198,7 @@ enum
NtUserGetWindowDpiAwarenessContext,
NtUserGetWindowTextLength,
NtUserIsWindow,
NtUserIsWindowEnabled,
NtUserIsWindowUnicode,
NtUserIsWindowVisible,
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment