Gdi32CreateEnhMetaFile(IntPtr, String, Rectangle, String) Method
Creates a device context (DC) for an enhanced-format metafile.
This device context can be used to store a device-independent picture.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("GDI32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static IntPtr CreateEnhMetaFile(
IntPtr hDc,
string filename,
ref Rectangle refRect,
string description
)
<DllImportAttribute("GDI32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function CreateEnhMetaFile (
hDc As IntPtr,
filename As String,
ByRef refRect As Rectangle,
description As String
) As IntPtr
Dim hDc As IntPtr
Dim filename As String
Dim refRect As Rectangle
Dim description As String
Dim returnValue As IntPtr
returnValue = Gdi32.CreateEnhMetaFile(hDc,
filename, refRect, description)
public:
[DllImportAttribute(L"GDI32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static IntPtr CreateEnhMetaFile(
IntPtr hDc,
String^ filename,
Rectangle% refRect,
String^ description
)
[<DllImportAttribute("GDI32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member CreateEnhMetaFile :
hDc : IntPtr *
filename : string *
refRect : Rectangle byref *
description : string -> IntPtr
No code example is currently available or this language may not be supported.
- hDc IntPtr
-
A handle to a reference device for the enhanced metafile.
This parameter can be Zero.
- filename String
-
The file name for the enhanced metafile to be created.
If this parameter is , the enhanced metafile is
memory based and its contents are lost when it is
deleted by using the DeleteEnhMetaFile(IntPtr) function.
- refRect Rectangle
-
A Rectangle structure that specifies the dimensions (in .01-millimeter units)
of the picture to be stored in the enhanced metafile.
- description String
-
A string that specifies the name of the application that created the picture, as well as the picture's title.
This parameter can be .
IntPtr
If the function succeeds, the return value is a handle to the device context for the enhanced metafile.
If the function fails, the return value is
Zero.