From 463bc1af0193395a5ce73fbe79f008f46e987194 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Fri, 22 Oct 2010 17:25:30 +0200 Subject: GDI: Created a help function, GetFormatEtc, that sets up a TFormatEtc record --- src/corelib/gdi/fpg_oledragdrop.pas | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/corelib/gdi/fpg_oledragdrop.pas b/src/corelib/gdi/fpg_oledragdrop.pas index 7bf2b997..0002c695 100644 --- a/src/corelib/gdi/fpg_oledragdrop.pas +++ b/src/corelib/gdi/fpg_oledragdrop.pas @@ -189,6 +189,7 @@ type function WindowsMimeLookup(const CFFormat: string): string; function EnumDataToStringList(DataObj: IDataObject): TStringList; +function GetFormatEtc(const CFFormat: DWORD): FORMATETC; implementation @@ -273,6 +274,15 @@ begin end; end; +function GetFormatEtc(const CFFormat: DWORD): FORMATETC; +begin + Result.CfFormat := CFFormat; + Result.Ptd := nil; + Result.dwAspect := DVASPECT_CONTENT; + Result.lindex := -1; + Result.tymed := TYMED_HGLOBAL; +end; + procedure DeepCopyFormatEtc(P1, P2: PFormatEtc); begin P2^ := P1^; -- cgit v1.2.3-70-g09d2