Metafiles (Scaling and Offseting)
-
Is there a trick to get the function SetViewportOrgEx to work with a metafile? I am creating a metafile in memory (MapMode is MM_ANISOTROPIC), then I am loading metafiles (WMF) off disk an using PlayMetaFile to play the loaded metafile into the new metafile (I am essentially creating 1 metafile from a combination of parts for a detail drawing). The problem is I need to place the loaded metafiles in various locations however I do not seem to be able to get the xy offset to move, although I have been able to scale the images using ScaleViewportExtEx. I have tried to convert the WMF files to Enhanced metafiles (EMF) - In memory then using then using the Enhanced metafile functions - I haven't had any luck this way either. Any suggestions?
-
Is there a trick to get the function SetViewportOrgEx to work with a metafile? I am creating a metafile in memory (MapMode is MM_ANISOTROPIC), then I am loading metafiles (WMF) off disk an using PlayMetaFile to play the loaded metafile into the new metafile (I am essentially creating 1 metafile from a combination of parts for a detail drawing). The problem is I need to place the loaded metafiles in various locations however I do not seem to be able to get the xy offset to move, although I have been able to scale the images using ScaleViewportExtEx. I have tried to convert the WMF files to Enhanced metafiles (EMF) - In memory then using then using the Enhanced metafile functions - I haven't had any luck this way either. Any suggestions?
I think that you actually want to use
SetWindowOrgEx
, this is the function that has the effect of shifting the origin.