IsMetaFile is an easy check used when porting wine static and listbox.
authorJames Tabor <james.tabor@reactos.org>
Tue, 25 Sep 2007 14:42:51 +0000 (14:42 +0000)
committerJames Tabor <james.tabor@reactos.org>
Tue, 25 Sep 2007 14:42:51 +0000 (14:42 +0000)
svn path=/trunk/; revision=29201

reactos/dll/win32/user32/include/user32.h
reactos/dll/win32/user32/misc/misc.c

index a4c1cba..0532659 100644 (file)
@@ -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);
+
index 8883155..7ec1bbb 100644 (file)
@@ -293,6 +293,22 @@ IsGUIThread(
     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)