I do appreciate your tests and comments, thanks!
- Code: Select all Expand view
- METHOD Paint() CLASS TMetaFile
local nVStep, nHStep
if ::hMeta == 0
if File( ::cCaption )
::hMeta = GetEnhMetaFile( ::cCaption )
elseif ! Empty( ::cCaption )
Alert( "Could not find the Metafile," + CRLF + "please check your TEMP environment variable" )
endif
endif
if ::hMeta != 0
::Shadow()
SetMapMode( ::hDC, MM_ANISOTROPIC )
/*
SetWindowExt( ::hDC, 100, 100 )
if ::nVRatio == nil
::SetCoors()
endif
SetViewportExt( ::hDC, 100 * ::nXZoom, 100 * ( ::nYZoom / 2 ) * ::nVRatio * ::Super:nWidth() / ::Super:nHeight() )
nHStep = ( ::Super:nWidth() * ( ::nXZoom - 1 ) ) / 9.8
nVStep = ( ( ::Super:nWidth() * ::nXZoom * ::nVRatio ) - ::Super:nHeight() ) / 10.3
SetViewOrg( ::hDC, -::nXorig * nHStep, -::nYorig * nVStep )
*/
PlayEnhMetaFile( ::hDC, ::hMeta, ::hWnd, .f. )
endif
return nil