May 19, 2024, 02:46:15 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


A couple of MDI questions

Started by Parker, May 23, 2006, 07:24:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Parker

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?

Ionic Wind Support Team

#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.
Ionic Wind Support Team

Parker

Thanks, at least now I know how to write it. Unfortunately, it wasn't what I was doing :(