Re: Does CreateParented destroys children automatically ????
Next message: Mike Glazer: "Delphi2005 Help"
Date: Wed, 26 Jan 2005 14:26:44 +0100
prashant_mandhare04@yahoo.com wrote:
> When we create a child window using Create method, the child windows
> are automatically destroyed when the parent is destrioyed.
>
> But, if I use CreateParented to create the, does the children windows
> are destroyed in same way ?
> What is the difference between a Parent and a Owner ?
>
The 'Parent' is the control wrapping the containing window.
The 'Owner' is the object responsible for object lifetime.
When you destroy the parent, children are expected to be left parentless
but still alive. Not so, they're also destroyed. The controls are worth
little without a parent window, so manual handling would be needed
anyway. If you do not want the children to be destroyed, you need to
remove them before parent destruction.
Next message: Mike Glazer: "Delphi2005 Help"
Relevant Pages
- Re: How make so child window always has focus unless clossed?
... The parent page is a allowing the user to choose the products that he or she wants. ... This child window displays all the products in the users shopping cart and asks for address, credit card info and so on. ... (comp.lang.javascript) - Re: Using ModalDialog behavior in firefox
... I also need to return a value to the parent window from a child window ... use from childwindow window.opener to get a reference to the parentwindow. ... (comp.lang.javascript) - Re: Reflection problem when changing parent window
... sort of does something resemblinjg what you think it might do, but overall its use is just ... A more serious question is why you need to destroy the parent and then have the window ... (microsoft.public.vc.mfc) - Re: Help in creating dialog based application
... you wouldn't want to destroy them; it is more likely you'd want to just hide ... But the way you would notify the parent dialog to do anything is PostMessage ... again some button to navigate back to main dialog/student list/course ... dialog as parent but how i will inform the parent window to distroy ... (microsoft.public.vc.mfc) - Re: Need help solving a threading issue
... (represented by a SendMessage to the window) ... create HWND's on a secondary thread. ... thread, but the issues really *are* different if you create child windows, dialogs, etc. ... I agree a child HWND whose parent was created in another thread is an issue, ... (microsoft.public.vc.mfc) |
|