RVOleDropEffect

General TRichView support forum. Please post your questions here
Post Reply
mj@rinas.dk
Posts: 5
Joined: Fri Jun 09, 2006 2:10 pm
Location: Denmark

RVOleDropEffect

Post by mj@rinas.dk »

I have a problem with Drag&Drop, in OleDragOver I want to set the DropEffect to rvdeLink, but rvdeLink is defined differently than DROPEFFECT_LINK (oleidl.h). Is there a reasone for this?

Also the Mouse Cursor does not change, like it does in e.g. Explorer.
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

You are right, this is a bug, and the reason is really in rvdeLink<>DROPEFFECT_LINK.

Fix:
in RVEdit.pas, add the function:

Code: Select all

function ConvertDropEffect(Effect: TRVOleDropEffect): Integer;
begin
  Result := ord(Effect);
  if Result=3 then
    inc(Result);
end;
In the same unit, change 2 calls of ord(AEffect) to ConvertDropEffect(AEffect).
Post Reply