-
sX (12.09.10 21:34) [0]I'm trying to port an existing app I have that accepts files dropped from Explorer.
In that app, I have
private
{ Private declarations }
public
procedure AcceptFiles( var msg : TMessage );
message WM_DROPFILES;
end;
and everything works fine.
With KOL, I get a message when compiling saying: "[DCC Error] Unit1.pas(38): E2029 Expression expected but 'END' found" (line 38 is where the "end;" is located.
If I move the procedure into the private section, the error message becomes "[DCC Error] Unit1.pas(33): E2003 Undeclared identifier: 'public'".
What can I do ? Thanks -
Jon © (12.09.10 21:50) [1]Use OnDropFiles - from the help:
property OnDropFiles: TOnDropFiles;
Assign this event to your handler, if You want to accept drag and drop files from other applications such as explorer onto your control. When this event is assigned to a control or form, this has effect also for all its child controls too.
procedure TSomeObject.DropFiles( Sender: PControl; const FileList: AnsiString; const Pt: TPoint );
var FList: PStrList;
I: Integer;
begin
FList := NewStrList;
FList.Text := FileList;
for I := 0 to FList.Count-1 do
begin
// do something with FList.Items[ I ]
end;
FList.Free;
end;