T O P I C R E V I E W |
Bernhard |
Posted - Feb 08 2021 : 06:21:37 Hi,
using Delphi, I can create an instance of TImageEnProc: proc := TImageEnProc.CreateFromBitmap(bmp); or proc := TImageEnProc.create(nil);
How can I create an instance of TImageEnProc with C++? Everything I tried didn't work.
Thank you for any help Bernhard |
3 L A T E S T R E P L I E S (Newest First) |
xequte |
Posted - Feb 10 2021 : 23:23:45 Hi Bernhard
My C++ is not great, but I would have thought you'd need to pass a TComponent class, e.g.
TImageEnProc *proc = new TImageEnProc(Self);
Nigel Xequte Software www.imageen.com
|
Bernhard |
Posted - Feb 09 2021 : 01:53:48 Hi Nigel, Thanks for the prompt reply. Of course I tried this line and the compiler aborted with the error message: Delphi-style classes must be allocated with 'new'
Then I tried TImageEnProc *proc = new TImageEnProc; This works with TIEBitmap, for example, but not with TImageEnProc. The compiler aborted with: no matching constructor for initialization of 'Imageenproc::TImageEnProc'
Next I tried: TImageEnProc *proc = new TImageEnProc(NULL); Compiler refused work and responded: call to constructor of 'Imageenproc::TImageEnProc' is ambiguous
Now I've tried something else: TIEBitmap *Quelle = new TIEBitmap; TImageEnProc *proc = new TImageEnProc(Quelle); And so it finally worked!
Should that be mentioned in the help for the class?
|
xequte |
Posted - Feb 08 2021 : 18:46:21 Hi Bernhard
It should be the same:
TImageEnProc proc = TImageEnProc->create(NULL);
Nigel Xequte Software www.imageen.com
|