hi everyone,
Is possible copy the content of metafile to clipboard of Windows ?
regards
#define CF_ENHMETAFILE 14
METHOD SetMetaFile( oMetaFile ) CLASS TClipBoard
local lResult := .f.
if ::Open()
EmptyClipboard()
lResult = SetClipboardData( CF_ENHMETAFILE, oMetaFile:hMeta )
lResult := ::Close() .and. lResult
endif
return lResult
method GetMetaFile()
local hMetaFile := 0
if ::Open()
hMetaFile = GetClpData( CF_ENHMETAFILE )
::Close()
endif
return hMetaFile
oMeta1:bRClicked := {|nRow,nCol| SelMeta(oMeta1) }
static Function SelMeta(oMeta)
local oClp:=TClipBoard():New( CF_ENHMETAFILE )
oClp:SetMetaFile( oMeta )
MSGINFO( oClp:IsEmpty() ) => returns .T. ?????
MSGINFO( oClp:GetMetaFile() ) => returns nil ?????
return nil
METHOD IsEmpty() CLASS TClipboard
local uValue
if ::Open()
do case
case ::nFormat == CF_TEXT
return Empty( GetClpData( CF_TEXT ) )
case ::nFormat == CF_BITMAP
return GetClpData( CF_BITMAP ) == 0
case ::nFormat == CF_ENHMETAFILE
return GetClpData( CF_ENHMETAFILE ) == 0
endcase
::Close()
endif
return .T.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 93 guests