IonicWind Software

Aurora Compiler => GUI => Topic started by: Parker on May 23, 2006, 07:24:52 PM

Title: A couple of MDI questions
Post by: Parker on May 23, 2006, 07:24:52 PM
I realized I probably shouldn't be assuming some things about MDI and general GUI programming with Aurora, so I decided to ask.

1) Does an MDI parent window automatically delete all child windows when it is closed?
2) Do MDI children windows get their OnClose message sent when the parent is closed? What about when they are DELETEd? I've tried both and it doesn't seem to work.
3) It is correct to delete controls and windows (pointers) when I am done with them, correct?
Title: Re: A couple of MDI questions
Post by: Ionic Wind Support Team on May 23, 2006, 08:15:20 PM
#1.  The handles are destroyed automatically by Windows as is the case of any child window.  You are responsible for dynamically created classes of course so be sure to delete any you have created with NEW.

#2.  No.  OnClose (WM_CLOSE) is only sent to a window when the close button is pressed.  Override OnDestroy if you need to perform cleanup duties.  OnDestory (WM_DESTROY) is sent to child windows after it is received by the parent.

#3.  Yes.
Title: Re: A couple of MDI questions
Post by: Parker on May 23, 2006, 09:03:48 PM
Thanks, at least now I know how to write it. Unfortunately, it wasn't what I was doing :(