Surfer
asked on
MDI operation on remaining child after on child closed?
I have a MDI app. If I have 3 or more child windows open at a time, and a close one off the 3 open windows, I want the remaining windows to automatically retile. A have a custom tile function in my CMainFrame and need to call it to reposition the remaining child windows. If I call this from the child I am closing, I get an ASSERTION because the child the calls reposition, is destroyed. I need to call this reposition AFTER the client is destroyed. I imagine I do this from CMainFrame but can not figure it out. All suggestions welcome and code samples greatly appreciated.
ASKER
How do I know when to check IsWindow()against my reposition, from CMainFrame? Is there a member in CMainFrame that is called AFTER the Child is destroyed?
ASKER
How do I know when to check IsWindow()against my reposition, from CMainFrame? Is there a member in CMainFrame that is called AFTER the Child is destroyed?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How do I know when to check IsWindow()against my reposition, from CMainFrame? Is there a member in CMainFrame that is called AFTER the Child is destroyed?
Try This
this is working , not to check IsWindow()
Add this code in ur CChildFrame Destructor
((CMDIFrameWnd*)AfxGetMain Wnd())->MD ITile(MDIT ILE_VERTIC AL);
GOOD LUCK
this is working , not to check IsWindow()
Add this code in ur CChildFrame Destructor
((CMDIFrameWnd*)AfxGetMain
GOOD LUCK
ASKER
That did the trick!
Hi,
Can U just post the code of how u r calling ur tile window function from child window? And if possible post the custom tile function also, so that we can get wher exactly it is crashing.
VinExpert
Can U just post the code of how u r calling ur tile window function from child window? And if possible post the custom tile function also, so that we can get wher exactly it is crashing.
VinExpert
GOOD LUCK