Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dblookup combobox component

36 views
Skip to first unread message

Taylan Karaoglu

unread,
Dec 24, 2001, 4:15:38 PM12/24/01
to
Hello ,
I try to write an component like dblookupcombobox but with my own project
style so this i try and looking delphi and rx codes after that i try to
write it in first try it works without any design properties after that i
try to do it with design time component and i saw an error "Control has no
parent window" message ..
I dont understand it after some of tryings i think its about bevelkind and
border style but why and how can i solve this problem if any body knows i
will thanks heartly .. Thanks now . Good Codings..

serge gubenko

unread,
Dec 25, 2001, 1:54:16 AM12/25/01
to

"Taylan Karaoglu" <dar...@olympos.org> wrote in message
news:3c279b64_1@dnews...

Hi, Taylan

Can you post sources of your control? It would be much easier to help you...
Anyway, try to move the bevelkind and border style assignment from the
constructor to the CreateWnd method.

regards


Paolo Casagrande

unread,
Dec 28, 2001, 2:48:58 AM12/28/01
to
"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...

Taylan Karaoglu

unread,
Dec 30, 2001, 7:27:18 AM12/30/01
to
Thanks a lot for help i miss send founded its because of on create parent
doesnt equalized and some of functions like parentcolor etc looks parent so
this exception accoured but paolo says with createwnd has got parent equal
:) thanks a lot .. Serge thanks for interesting :)


0 new messages