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.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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
)

Parameters

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 .

Return Value

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.

Remarks

See Also