Article View: borland.public.cppbuilder.nativeapi
Article #1013Re: TFrame changes?
From: Remy Lebeau (TeamB)
Date: Wed, 31 Oct 2007 18:26
Date: Wed, 31 Oct 2007 18:26
26 lines
2048 bytes
2048 bytes
"Steven Haworth" <SHaworthatbigponddotnetdotau> wrote in message news:4728052a@newsgroups.borland.com... > If I define a TFrame descendant in my project that contains a > TWinControl derived control, then I always get the exception > > Project xx.exe raised exception class EInvalidOperation with > message 'Control 'Frame2' has no parent window' That happens when you are trying to do something during creation that requires an HWND to be present, but no HWND can be created because the Parent has not been assigned yet. What are you actually doing inside the TFrame when it is being created? Have you tried stepping through the TFrame's construction code yet to see exactly where the exceptions is occuring? My guess is that you are trying to initialize the TWinControl with some data, so it tries to create its HWND, which requests the TFrame to create its HWND, which then fails. > If the frame has just a label or something like that on it, then it > wont throw an exception. TLabel is a graphical control. It does not have or need an HWND. Gambit
Technical Details
Message-ID:
<4728c912$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4728052a@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,67bb774301b7b83 X-Google-Attributes: gid10cc67,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4728052a@newsgroups.borland.com> Subject: Re: TFrame changes? Date: Wed, 31 Oct 2007 11:26:23 -0700 Lines: 28 Organization: Lebeau Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 207.178.157.90 Message-ID: <4728c912$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1193855250 207.178.157.90 (31 Oct 2007 11:27:30 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail