Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CStatic::GetEnhMetaFile 

Gets the handle of the enhanced metafile, previously set with SetEnhMetafile, that is associated with CStatic.


HENHMETAFILE GetEnhMetaFile( ) const;

A handle to the current enhanced metafile, or NULL if no enhanced metafile has been set.

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")) );

Community Additions

ADD
Show:
© 2015 Microsoft