Re: No TForm::OnMove()-Event?


2006-02-14 05:35:50 PM
cppbuilder77
MR <>wrote:
Quote

that a class's Form1 methode (Form1::WinProc) is called
before the constructor of this class Form1::Form1 is
finished?
We know that this is the case but it doesn't make sense to me
either. Perhaps Gambit will explain it to both of us???
Quote
what's the difference to the OnCreate()-methode?
Make no mistake, it is my opinion that OnCreate and OnDestroy
should never be used. C++ classes have ctors and dtors and if
one is coding in C++, then one should code in C++. However,
OnCreate and OnDestroy *can* be used if you know what you're
doing with them. See TForm's OldCreateOrder property.
Quote
Or does it mean, that my way to handle it (described in the former
post from me) (with the help-var 'ConstructionDone') is a way to
handle it correctly?
It works but I would prefere to post a custom message from the
ctor instead. PostMessage just adds the messages to the queue
and execution continues. By time my custom message is processed
I *know* that everything is fully constructed.
~ JD