GetEnhMetaFileDescription

  UINT GetEnhMetaFileDescription(hemf, cchBuffer, lpszDescription)    
  HENHMETAFILE hemf; /* handle of enhanced metafile */
  UINT cchBuffer; /* size of text buffer in characters */
  LPTSTR lpszDescription; /* address of text buffer */

The GetEnhMetaFileDescription function retrieves an optional text description from the enhanced metafile that is identified by hemf and copies the string to the buffer at which lpszDescription points.

Parameters

hemf

Identifies the enhanced metafile.

cchBuffer

Specifies the size, in characters, of the buffer at which lpszDescription points. This is the maximum number of characters copied.

lpszDescription

Points to the buffer into which the function copies the optional text description.

Return Value

If the optional text description does not exist, the return value is 0. If the text description exists but lpszDescription is NULL, the return value is the length of the string in characters. If the text description exists and lpszDescription is a valid pointer, the return value specifies the number of characters copied into the buffer. Otherwise it is GDI_ERROR.

Comments

The optional text description contains two strings, the first identifies the application used to create the enhanced metafile and the second identifies the picture contained in the metafile. The two strings are separated by two null characters. For example: “XYZ Graphics Editor\0\0Bald Eagle\0” where '\0' represents the NULL character.

The GetEnhMetaFileDescription function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set).

See Also

CreateEnhMetaFile