It seems there is some overlap with some components. eg there are dialogs available under NG dialogs and also the dialog pack. For other components there are duplicates in the EL set. eg ElInspector vs SimplePropInspector
Is there a recommendation for which set of components to use? eg favor NG over EL over other components.
Comments
Delphi
if C.Data.HasFormat(CF.TEXT) then
In CBuilder is
if(C->Data->HasFormat(__classid(Ng::Dragdrop::Formats::TNGTextFormat)))
Delphi
d: TNGFileArray;
cnt: TNGFileContents;
if C.Accept(CF.FILEDESCRIPTOR.Ref(@d)) and
C.Accept(CF.FILECONTENTS.Ref(@cnt)) then
CBuilder
TNGFileArray fa;
C->Accept(Ng::Dragdrop::Formats::TNGFileDescriptorFormat::Ref(&fa));
TNGFileContents Content;
C->Accept(Ng::Dragdrop::Formats::TNGFileContentsFormat::Ref(&Content));
for(int i=0; i<fa.Length; i++)
{
DelphiInterface<IStream> ConversionStream = Content[i];
// how to get Stream from IStream ?
}
Same with
NGDropSource1.Data.Add(CF.FILEDESCRIPTOR.Data(...));
At least I can create an IStream at from a stream.
std::unique_ptr<TMemoryStream> fStream(new TMemoryStream);
DelphiInterface<IStream> AStream(*(new TStreamAdapter(fStream.get(), soReference)));
cnt: TNGFileContents;
if C.Accept(CF.FILEDESCRIPTOR.Ref(@d)) and
C.Accept(CF.FILECONTENTS.Ref(@cnt)) then
fd.Name = Filename;
fd.Size = Size;
DropSource1->Data->Add(Ng::Dragdrop::Formats::TNGFileDescriptorFormat::Data(fd));
std::unique_ptr<TMemoryStream> ConversionStream(new TMemoryStream);
ConversionStream->CopyFrom(Stream.get(), Stream->Size);
ConversionStream->Seek(0, soFromBeginning);