Export (0) Print
Expand All

GetEnhMetaFileDescription function

The GetEnhMetaFileDescription function retrieves an optional text description from an enhanced-format metafile and copies the string to the specified buffer.

Syntax


UINT GetEnhMetaFileDescription(
  _In_   HENHMETAFILE hemf,
  _In_   UINT cchBuffer,
  _Out_  LPTSTR lpszDescription
);

Parameters

hemf [in]

A handle to the enhanced metafile.

cchBuffer [in]

The size, in characters, of the buffer to receive the data. Only this many characters will be copied.

lpszDescription [out]

A pointer to a buffer that receives the optional text description.

Return value

If the optional text description exists and the buffer pointer is NULL, the return value is the length of the text string, in characters.

If the optional text description exists and the buffer pointer is a valid pointer, the return value is the number of characters copied into the buffer.

If the optional text description does not exist, the return value is zero.

If the function fails, the return value is GDI_ERROR.

Remarks

The optional text description contains two strings, the first identifying the application that created the enhanced metafile and the second identifying the picture contained in the metafile. The strings are separated by a null character and terminated with two null charactersfor example, "XYZ Graphics Editor\0Bald Eagle\0\0" where \0 represents the null character.

Where text arguments must use Unicode characters, use this function as a wide-character function. Where text arguments must use characters from the Windows character set, use this function as an ANSI function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h (include Windows.h)

Library

Gdi32.lib

DLL

Gdi32.dll

Unicode and ANSI names

GetEnhMetaFileDescriptionW (Unicode) and GetEnhMetaFileDescriptionA (ANSI)

See also

Metafiles Overview
Metafile Functions
CreateEnhMetaFile

 

 

Community Additions

ADD
Show:
© 2014 Microsoft