Ah Okay danke
toms
Hier noch der komplette funktionierende code:
Delphi-Quellcode:
procedure ...;
var
u: IUnknown;
reole: IRichEditOle;
i, n: Integer;
obj: TREObject;
begin
FillChar(obj, SizeOf(obj), 0);
obj.cbStruct := SizeOf(obj);
with re do //mein jvrichedit
begin
Perform(EM_GETOLEINTERFACE, 0, Integer(@u));
if Succeeded(u.QueryInterface(IID_IRICHEDITOLE, reole)) then
begin
n := reole.GetObjectCount;
ShowMessage(Format('%d objects found', [n]));
for i := Pred(n) downto 0 do
begin
reole.GetObject(i, obj, REO_GETOBJ_ALL_INTERFACES);
SelStart := obj.cp;
SelLength := 1;
SelText := Format('<object %d>', [Succ(i)]);
end;
end;
end;
end;
Ich danke nochmal für die Hilfe
MfG
Chefx