"Control ... has no parent window". I am using C++ and I have a similar
problem for wich I found a solution (thanks to
cppbuilder.components.writing). The problem is when your need the parent but
you have no parent yet (tipically in the constructor, no window handle is
yet available). you can avoid it in two different way
1st)
override the virtual CreateWnd(), first call the parent CreateWnd() so you
have the window handle. put here the code from the constructor that need the
parent window.
2nd)
put this in the constructur
Parent = dynamic_cast<TWinControl *>(Owner);
so the control has the right Parent.
For me, 2nd solution seems better. I am usign C++ builder, but you can
translate to delphi.
Bye, Paolo
"Taylan Karaoglu" <dar...@olympos.org> ha scritto nel messaggio
news:3c279b64_1@dnews...