Author: jimtabor
Date: Tue Sep 25 18:42:51 2007
New Revision: 29201
URL:
http://svn.reactos.org/svn/reactos?rev=29201&view=rev
Log:
IsMetaFile is an easy check used when porting wine static and listbox.
Modified:
trunk/reactos/dll/win32/user32/include/user32.h
trunk/reactos/dll/win32/user32/misc/misc.c
Modified: trunk/reactos/dll/win32/user32/include/user32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
==============================================================================
--- trunk/reactos/dll/win32/user32/include/user32.h (original)
+++ trunk/reactos/dll/win32/user32/include/user32.h Tue Sep 25 18:42:51 2007
@@ -42,3 +42,5 @@
HGDIOBJ STDCALL NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj);
BOOL STDCALL NtGdiPatBlt(HDC hdcDst, INT x, INT y, INT cx, INT cy, DWORD rop4);
LONG STDCALL GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *);
+BOOL FASTCALL IsMetaFile(HDC);
+
Modified: trunk/reactos/dll/win32/user32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/misc…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/misc.c (original)
+++ trunk/reactos/dll/win32/user32/misc/misc.c Tue Sep 25 18:42:51 2007
@@ -293,6 +293,22 @@
return TRUE;
}
+BOOL
+FASTCALL
+IsMetaFile(HDC hDc)
+{
+ DWORD Type = GetObjectType((HGDIOBJ) hDc);
+ switch(Type)
+ {
+ case OBJ_METADC:
+ case OBJ_METAFILE:
+ case OBJ_ENHMETADC:
+ case OBJ_ENHMETAFILE:
+ return TRUE;
+ }
+ return FALSE;
+}
+
PUSER_HANDLE_ENTRY
FASTCALL
GetUser32Handle(HANDLE handle)