diff --git a/dlls/user.exe16/user_private.h b/dlls/user.exe16/user_private.h index 336b89102d4..afd75f0b096 100644 --- a/dlls/user.exe16/user_private.h +++ b/dlls/user.exe16/user_private.h @@ -24,8 +24,7 @@ #include #include "windef.h" #include "winbase.h" -#include "wingdi.h" -#include "winuser.h" +#include "ntuser.h" #include "winreg.h" #include "winternl.h" #include "wine/windef16.h" diff --git a/dlls/user.exe16/window.c b/dlls/user.exe16/window.c index 5a9448a2131..01d1b101c92 100644 --- a/dlls/user.exe16/window.c +++ b/dlls/user.exe16/window.c @@ -23,7 +23,6 @@ #include "user_private.h" #include "wine/list.h" #include "wine/server.h" -#include "wine/gdi_driver.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(win); @@ -676,7 +675,7 @@ HDC16 WINAPI GetWindowDC16( HWND16 hwnd ) INT16 WINAPI ReleaseDC16( HWND16 hwnd, HDC16 hdc ) { INT16 ret = (INT16)ReleaseDC( WIN_Handle32(hwnd), HDC_32(hdc) ); - SetHookFlags( HDC_32(hdc), DCHF_ENABLEDC ); + NtUserCallOneParam( HandleToUlong( HDC_32(hdc) ), NtUserEnableDC ); return ret; } diff --git a/dlls/win32u/gdiobj.c b/dlls/win32u/gdiobj.c index 888313ad685..208ebb1da5e 100644 --- a/dlls/win32u/gdiobj.c +++ b/dlls/win32u/gdiobj.c @@ -1216,7 +1216,6 @@ static struct unix_funcs unix_funcs = NtUserWindowFromPoint, SetDIBits, - SetHookFlags, __wine_get_brush_bitmap_info, __wine_get_file_outline_text_metric, __wine_get_icm_profile, diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 7908dc62716..cb16237d9f1 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -4635,6 +4635,8 @@ ULONG_PTR WINAPI NtUserCallOneParam( ULONG_PTR arg, ULONG code ) return HandleToUlong( begin_defer_window_pos( arg )); case NtUserCreateCursorIcon: return HandleToUlong( alloc_cursoricon_handle( arg )); + case NtUserEnableDC: + return SetHookFlags( UlongToHandle(arg), DCHF_ENABLEDC ); case NtUserGetClipCursor: return get_clip_cursor( (RECT *)arg ); case NtUserGetCursorPos: diff --git a/dlls/win32u/win32u.spec b/dlls/win32u/win32u.spec index fc659c4ca9f..e37907e7399 100644 --- a/dlls/win32u/win32u.spec +++ b/dlls/win32u/win32u.spec @@ -1321,7 +1321,6 @@ # Wine internal extensions # user32 -@ stdcall SetHookFlags(long long) @ cdecl __wine_set_visible_region(long long ptr ptr ptr) # Graphics drivers diff --git a/dlls/win32u/win32u_private.h b/dlls/win32u/win32u_private.h index 3f9183a2b1d..ac40daa5d35 100644 --- a/dlls/win32u/win32u_private.h +++ b/dlls/win32u/win32u_private.h @@ -273,7 +273,6 @@ struct unix_funcs INT (WINAPI *pSetDIBits)( HDC hdc, HBITMAP hbitmap, UINT startscan, UINT lines, const void *bits, const BITMAPINFO *info, UINT coloruse ); - WORD (WINAPI *pSetHookFlags)( HDC hdc, WORD flags ); BOOL (CDECL *get_brush_bitmap_info)( HBRUSH handle, BITMAPINFO *info, void *bits, UINT *usage ); BOOL (CDECL *get_file_outline_text_metric)( const WCHAR *path, OUTLINETEXTMETRICW *otm ); BOOL (CDECL *get_icm_profile)( HDC hdc, BOOL allow_default, DWORD *size, WCHAR *filename ); diff --git a/dlls/win32u/wrappers.c b/dlls/win32u/wrappers.c index 471bfa449b1..9665c8106c4 100644 --- a/dlls/win32u/wrappers.c +++ b/dlls/win32u/wrappers.c @@ -1112,12 +1112,6 @@ INT WINAPI SetDIBits( HDC hdc, HBITMAP hbitmap, UINT startscan, return unix_funcs->pSetDIBits( hdc, hbitmap, startscan, lines, bits, info, coloruse ); } -WORD WINAPI SetHookFlags( HDC hdc, WORD flags ) -{ - if (!unix_funcs) return 0; - return unix_funcs->pSetHookFlags( hdc, flags ); -} - BOOL CDECL __wine_get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WCHAR *filename ) { if (!unix_funcs) return FALSE; diff --git a/include/ntuser.h b/include/ntuser.h index a4e28764e0d..f68f5481f90 100644 --- a/include/ntuser.h +++ b/include/ntuser.h @@ -99,6 +99,7 @@ enum { NtUserBeginDeferWindowPos, NtUserCreateCursorIcon, + NtUserEnableDC, NtUserGetClipCursor, NtUserGetCursorPos, NtUserGetIconParam,