OleMetafilePictFromIconAndLabel function (ole2.h)
Creates a metafile in which the specified icon and label are drawn.
HGLOBAL OleMetafilePictFromIconAndLabel( HICON hIcon, LPOLESTR lpszLabel, LPOLESTR lpszSourceFile, UINT iIconIndex );
Handle to the icon that is to be drawn into the metafile. This parameter can be NULL. If hIcon is NULL, this function returns NULL without creating a metafile.
The icon label. This parameter can be NULL. If lpszLabel is NULL, the resulting metafile will not include a label.
The path and file name of the icon file. This string can be obtained through the user interface or from the registration database. This parameter can be NULL.
The location of the icon within the file named by lpszSourceFile, expressed as an offset in bytes from the beginning of file.
A global handle to a METAFILEPICT structure containing the icon and label. The metafile uses the MM_ANISOTROPIC mapping mode.
If an error occurs, the returned handle is NULL. In this case, the caller can call GetLastError to obtain further information.
If lpszSourceFile is not NULL and iIconIndex is not 0, the name of the source file passed in lpszSourceFile and the index passed by iIconIndex are added to the created metafile as a comment record.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|