Creates a METAFILEPICT structure that contains a metafile in which the icon and label are drawn.

HGLOBAL OleMetafilePictFromIconAndLabel(

HICON hIcon,
//Handle to the icon to be drawn into the metafile
LPOLESTR lpszLabel,
//Points to the string to be used as the icon label
LPOLESTR lpszSourceFile,
//Points to the string that contains the path to the icon file
UINT iIconIndex
//Index of icon in lpszSourceFile



Handle to the icon that is to be drawn into the metafile.


Points to the string to be used as the icon label.


Points to the string that contains the path and filename of the icon file. This string can be obtained from the user or from the registration database.


Provides the index to the icon within the lpszSourceFile file.

Return Value


Indicates the hGlobal returned is the handle to a METAFILEPICT structure containing the icon and label. The metafile uses the MM_ANISOTROPIC mapping mode.

See Also

OleGetIconOfClass, OleGetIconOfFile

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database