CStatic::SetEnhMetaFile
Associates a new enhanced metafile image with the static control.
HENHMETAFILE SetEnhMetaFile(
HENHMETAFILE hMetaFile
);
Параметры
- hMetaFile
Handle of the enhanced metafile to be drawn in the static control.
Возвращаемое значение
The handle of the enhanced metafile previously associated with the static control, or NULL if no enhanced metafile was associated with the static control.
Заметки
The enhanced metafile will be automatically drawn in the static control. The enhanced metafile is scaled to fit the size of the static control.
You can use various window and static control styles, including the following:
- SS_ENHMETAFILE Use this style always for enhanced metafiles.
Пример
CStatic myStatic;
// Create a child enhanced metafile static control.
myStatic.Create(_T("my static"),
WS_CHILD|WS_VISIBLE|SS_ENHMETAFILE|SS_CENTERIMAGE,
CRect(10,10,150,50), pParentWnd);
// If no image is defined for the static control, define the image
// to be "myemf.emf."
if (myStatic.GetEnhMetaFile() == NULL)
myStatic.SetEnhMetaFile(::GetEnhMetaFile(_T("myemf.emf")));
Требования
Header: afxwin.h