薛
薛磊磊
Unregistered / Unconfirmed
GUEST, unregistred user!
关于网上在Richedit上插入图片的代码问题。GetGif函数中,能不能取得图片,而不仅仅是图片的索引和位置 _ReObject = record cbStruct: DWORD; { Size of structure } cp: ULONG; { Character position of object } clsid: TCLSID; { Class ID of object } poleobj: IOleObject; { OLE object interface } pstg: IStorage; { Associated storage interface } polesite: IOleClientSite; { Associated client site interface } sizel: TSize; { Size of object (may be 0,0) } dvAspect: Longint; { Display aspect to use } dwFlags: DWORD; { Object status flags } dwUser: DWORD; { Dword for user's use } end; TReObject = _ReObject;function GetGif (hRichEdit: THandle): TList;type tagSize = TSize;var i: integer; FRTF: IRichEditOle; ReObject: TReObject; lstGif: TList; slstRow: TStringList;begin lstGif := TList.Create; Sendmessage(hRichEdit, EM_GETOLEINTERFACE, 0, LongInt(@FRTF)); for i := 0 to FRTF.GetObjectCount - 1 do begin slstRow := TStringList.Create; FillChar(ReObject, SizeOf(ReObject), 0); ReObject.cbStruct := SizeOf(ReObject); FRTF.GetObject (Longint (i), ReObject, REO_BELOWBASELINE); //ReObject.poleobj中已有图片的数据 用什么方法能取出来呢 我要保存为Gif格式 //ReObject.poleobj slstRow.Add (IntToStr (ReObject.dwUser)); slstRow.Add (IntToStr (ReObject.cp)); lstGif.Add(slstRow); end; Result := lstGif;end;