第一个问题:
在TContextMenu.SEIInitialize中将DragQueryFile那段改为:
filecount :=DragQueryFile(StgMedium.hGlobal, $FFFFFFFF, nil, 0);
if filecount>=1 then
begin
for i:=0 to filecount-1do
begin
DragQueryFile(StgMedium.hGlobal, i, FFileName, SizeOf(FFileName));
//你必须要用Tstringlist或string数组来保存所有的FFileName
end;
Result := NOERROR;
end
else
begin
FFileName[0] := #0;
Result := E_FAIL;
end;