Click here to Skip to main content
15,902,636 members
Everything / MDI

MDI

MDI

Great Reads

by Darryl Bryk
Code is described for drawing an image as a 3D surface plot using OpenGL
by Robert Gustafson
Simplifies working with ToolStrip-type menus and tool bars for MDI-parent and other forms; also works with ToolStrip-type context menus
by snavece
Updating CToolBar to MFC Feature Pack (2008)

Latest Articles

by Robert Gustafson
Simplifies working with ToolStrip-type menus and tool bars for MDI-parent and other forms; also works with ToolStrip-type context menus
by snavece
Updating CToolBar to MFC Feature Pack (2008)
by Darryl Bryk
Code is described for drawing an image as a 3D surface plot using OpenGL

All Articles

Sort by Title

MDI 

6 Jun 2014 by ilostmyid2
hiIn an MDI program written in C++, I've this problem. When a new document is creating, it's view is shown repeatedly with different sized until it gets its final size. I put TRACE in OnSize of the corresponding child frame and got the following...
6 Jun 2014 by Sergey Alexandrovich Kryukov
Here is the idea: who needs MDI, ever? Why torturing yourself and scaring off your users?Do yourself a great favor: do not use MDI at all. You can do much easier to implement design without it, with much better quality. MDI is highly discouraged even by Microsoft, in fact, Microsoft dropped it...
28 Jul 2011 by Michael Waguih
Hi all,In my project I have a MDI_Parent form where I can show several MDI_Child.When opening any Child_Form it is running well but when closing the one at the front, only the MDI_Parent appears and the Child_Form titles appear with the boxes minimize , maximize and Exit.On maximize...
26 Mar 2011 by Abhinav S
You can start by making sure any third party your child form uses are installed.Try to open the form in design mode and post the error that occurs here and maybe someone can help you.
27 Mar 2011 by Dalek Dave
I am sure there will be more help available if you were to post some of the code.Hard to know what is going on without it, but are you calling the forms correctly? Are there any DLLs attached to the form? Where is the Focus?More information = More Help.
27 Mar 2011 by Brijesh Kr
I think you are using like follow:At an event of a control of MDI use follow: child ch=new child(); ch.MdiParent = this; ch.Show();First you should have a Form, enable it's IsMdiContainer=true.child is a normal form.
28 Jul 2011 by Michael Waguih
I found the solution by assigning the Start position property of the child form to "center parent"
22 May 2015 by xuyunhai
there are four forms in application.one is main form,main form contains three mdi child forms.but i need use splitcontainer component to split child forms,after use split compenent,the mdi child form can't active,why appear this problem? how could i solve this problem.the demo image show...
23 May 2015 by Dave Kreskowiak
What you're describing tells me you should NOT be using MDI at all.MDI stands for "Multiple DOCUMENT interface". This means that you're opening multiple documents for editing in multiple copies of the same editor window. Kind of like opening multiple Notepad windows all in the same...
3 Nov 2015 by Member 12041961
In my project i need to put the inserted data from an edit control in to a double liked list and then print all entries in a List Control.My teacher told me to handle the data in a struct (so i'm not allowed to do this in a class). I put the struct in the ...Doc.h file. The struct looks like...
3 Nov 2015 by KarstenK
You have a big task, and need it to split in little tasks. My first advice, is to write some helper functions for filling the struct. Likevoid setAnrede( adressen*data, const char* anrede ) { strncpy( data->anrede, anrede, 5 - 1 );//use maximal allowed space minus 1 (for the delimeter)}...
3 Nov 2015 by CPallini
You don't need hint and trick at all, just a plain transfer of values from the edit controls to struct's member. You may use GetWindowText[^] if your member varaibles are CEdit pointers or directly copy the strings if your member varaiables are CStrings.Please note C++ struct are basically...
14 Feb 2013 by SweetHoneyBee
Can we add different applications to MDI??Here is the screen shot of my MDI form.http://img267.imageshack.us/img267/5222/mdiv.jpg[^]I have created multiple applications before and now I want to add them to this MDI. So how to add them? Do I have to import all projects to my MDI...
14 Feb 2013 by Sergey Alexandrovich Kryukov
First of all, the question makes no sense. There is no such thing as "add application to an application".If you simply mean that you want to run an application (start a child process), you can do it, but what are you going to do with it? Processes are very well isolated. If they are not...
4 Jul 2013 by Manuel Torres
Buenas,Quisiera saber como puedo crear un formulario que por medio de un boton me llame una aplicacion (.exe) fuera del proyecto y que esté contenida dentro del formulario.He visto muchos ejemplos pero no logro todavía realizarlo.Actualmente estoy usando Visual Studio 2010De...
4 Jul 2013 by CPallini
(If I got you) have a look at "Managing Processes and Threads in Windows Forms"[^] (see the "Full Example" section).
5 Jul 2013 by Manuel Torres
very good contribution but what I really need is that this app (. exe) running is integrated into a form and do not leave it.
16 Jun 2018 by Chopin2001
I have a Windows graphic program on MDI, MFC and Document has a 'wxr' object. The WXR have a CtypedPtrList OBList. OBList* m_pList; And CBackground has a CString members. CString m_projectPathName; CString m_projectName; The program have a Error when close the...
18 Feb 2016 by Davester28
There must be an easier way to do this...' MDI Parent code calling save routine on child form Private Sub SaveToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripButton.Click If TypeOf (MDICurrentForm) Is...
18 Feb 2016 by Richard Deeming
Use an Interface[^].Walkthrough: Creating and Implementing Interfaces (Visual Basic)[^]Public Interface ISaveableForm Sub SaveNow()End Interface...Private Sub SaveToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
21 Jun 2015 by SrgjanX
Why for example, when I load a child form in my MDI container, the form is auto resized?It really need to be perfect looking and thats why i asked here, maybe someone had this problem before and knows the solution, this is how i see the child form in my visual...
21 Jun 2015 by Dave Kreskowiak
One, from hat you've shown, you shouldn't be using MDI at all.Second, if you have just ONE child form maximized in MDI, ALL child forms are maximized. This will resize your forms to fill the MDI client area. You cannot turn that behavior off. Like I said, nothing you're shown justifies using...
2 Jan 2012 by Anthony Dilshan
- How to bring a MDI child form to the front when MDI Parent has some controls in itI have created a "MDI Parent" form containing a Split Container & Tree View Controls, when i try to open a Form (MDI Child), that form opens behind the Split Container. Could some one please explain how to...
2 Jan 2012 by Wendelius
MDI parent form should not have any controls on it excluding status bar or menu bar etc. MDI children are drawn behind the controls on MDI parent.Also if this is a new software consider moving to SDI interface since MDI is deprecated actually a long time ago. For new users SDI is more...
2 Jan 2012 by Sergey Alexandrovich Kryukov
This is problematic because the MDI parent is not designed to host any controls except one. This control (which you can access using raw Windows API) is so called MDI client, it takes the whole client area of the MDI parent and is only designed to host MDI children. I remember that even the...
12 Apr 2013 by Bryan Rogers
I had this issue too and this is the code I used to handle it. public partial class frmBeam : Form { frmMain FormMain; frmBeamControl FormBeamControl; private void frmBeam_Click(object sender, EventArgs e) { FormBeamControl = new...
12 Apr 2013 by Aarti Meswania
Load child form inside a panel then add that panel in MDI runtimeand it will work same as you desire...Form1 frm = new Form1(); // Child form's objectPanel p = new Panel(); // Run time a panel is createdp.Controls.Add(frm); // add child form in panelthis.Controls.Add(p); // 'this'...
30 Oct 2014 by PrasadKumar
Hello,I have inherited Form1 to Form2. I want to show Form2 as MDI child. But, while showing it throws "Error creating window handle.".Form1: Form{}Form2: Form1{}MdiForm: Form{ Form2 objForm = new Form2(); objForm.MdiParent = this; objForm.WindowState...
30 Oct 2014 by OriginalGriff
From that little, we can;t really answer your problem.But there are a couple of things you can check.First, make sure that the MdiForm instance has the IsMDIContainer property set to true.Then, check exactly where you are executing the code you show above: if the MdiForm instance has not...
31 May 2012 by Sandeep Mewara
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
22 Nov 2020 by LebrunThierry
C++, MFC, MDI application ... How to change the MDI main widows bar color? What I have tried: I tryed with mainframe ... or aCMFCVisualManagerWindows7 derived class BOOL CCiVisualStyle::DrawTextOnGlass(CDC* pDC, CString strText, CRect...
12 Jul 2011 by Sig Pimp
I'm playing around with MDI (I know, I know...torturing myself. I guess I like pain.) and have an issue with child form controls not showing up after setting the child form dockstyle to fill when the child form is created.Parent Form:using System;using...
12 Jul 2011 by Syed Salman Raza Zaidi
Hi,From your parent form go to properties window and set IsMdiContainer value to true
15 Aug 2018 by Amit Sharma (Patna)
dear all i have a mdiform with a panel on the screen. Panel has a form (for dashboard purpose). it is displaying perfect but as i started opening other forms using mdi menu, child form hides. Please give me some suggestions to resolve the problem i am facing... Thanks and regards Amit Kumar ...
2 Mar 2011 by Vishal_K89
I am using MFC Application, Editor provided for display, I have encountered the problem of When I type text and copy text from editor to Notepad, the text is illegible.As per Information. The End of Line is CRLF in windows and LF in Unix varaints, but, even though necessary EOL updations...
2 Mar 2011 by Andrew Brock
Notepad uses a standard Windows Edit Box. This requires a CR/LF combination for a new line. Wordpad uses a customised RichEdit control.Basically, you are going to have to insert a '\r' everywhere there a '\n' in the string before you send it across. There are a heap of ways for doing this....
17 Feb 2016 by Member 11380615
Dear All,I am working on a project which is a mixture of dialog and MDI. The project started as a tabbed dialog project. Later MDI was added to it. On clicking one of the tabs the MDI is invoked. Without clicking the a particular tab it remains only a dialog based project.The project works...
17 Feb 2016 by Jochen Arndt
It seems you already found the asserting line and it tells you what has happened (the messages should have been also printed to the Debug Output window):# ifdef _DEBUG if (m_nMapMode == MM_NONE) { TRACE(traceAppMsg, 0, "Error: must call SetScrollSizes() or...
3 Jul 2016 by Member 11380615
I am not able to draw on the non client area of the MDI child window.Please post any code snippet that may work.Regards,Rakesh
4 Aug 2011 by anushan23
Hi! I need to know how to change the background image for my MDI application on a daily basis. Can anybody tell me how I can achieve this? Example today is Friday so today one background image .tomorrow automatically change another background image Any codeThanks for your interest!
4 Aug 2011 by YvesDaoust
A way is to permanently store and keep updated the date of the last change. When you launch the application, check if that date has changed and set a new background image. (If the application stays running for long periods, you should check the date, say, every hour also.)Need more details ?
19 Oct 2015 by Member 12041961
Data from .txt file write in array.I need to read a .txt file in to an array.exaple of one line in the .txt file:lastname, prename, town, and so on.i need to insert every word in another place in the array.How can i make this?Thanks a lot
19 Oct 2015 by George Jonsson
As you are using MFC, you can use CStringT::Tokenize[^] to split every line you read in separate words using the comma (,).Then you can place each word in the array using a loop.
19 Oct 2015 by OriginalGriff
Have a look at this: Reading and Writing CSV Files in MFC[^]
4 Sep 2018 by saide_a
hi all I have a MFC MDI c++ program, And I want to know is it possible to decide about close one of tabs (sure to close MsgBox) ? something similar to oncancel function in dialogue base program. and also is there a event to close the entire program on closing one of tabs? thanks for your...
4 Sep 2018 by KarstenK
You can use the WM_CLOSE message. Use the PostMessage API for it and do all needed operations like saving data and settings before. You can also use PostQuitMessage.
1 Jun 2011 by Chris___808
I would like to be able to "customize" my toolbar depending on what type of child frame becomes active in my MDI application. I have been using CMFCToolbar because they look nice and Visual Studio steers you in that direction.I could not determine how to do it automatically (like the menus...
1 Jun 2011 by వేంకటనారాయణ(venkatmakam)
Check this with TBBS_DISABLED style,CMFCToolBar::SetButtonStyle.But this will use zero based button index.
4 Jun 2011 by Chris___808
Venkat and Anna,Thanks for the replies. The following code seems to work with one caveat mentioned below (I decided to stick with CMFCToolBar):void CMyToolBar::EnableButton (int iCmd, BOOL bStatus){ // iCmd is not the index, but the command ID - this way the // buttons can...
6 Jun 2011 by Jaadooo
auto_ptrauto_ptr
25 Mar 2012 by Tom Novy
How read mouse coordinates from an existing text file and draw line between each of the points(coodinates) onto a child MDI Form? Please help
25 Mar 2012 by Sergey Alexandrovich Kryukov
It has nothing to do with MDE. You can do it with any control, including System.Windows.Form.Form.First of all, to get mouse coordinates, handle appropriate mouse events; please see:http://msdn.microsoft.com/en-us/library/system.windows.forms.control.aspx[^].Alternatively, subclass...
27 Jul 2011 by Darryl Bryk
Code is described for drawing an image as a 3D surface plot using OpenGL
24 May 2011 by soulprovidergr
Hi, Is there any way to load forms compiled in other project assemblies(.dll files) using interfaces ? Has anyone some code example.I am currently developing a Windows Application using Mdi childs children [SA] and ribbons and I need to dynamicaly load forms depending on assemblies found on...
25 May 2011 by Sergey Alexandrovich Kryukov
Yes of course. You can even compile some project during run-time and add compiled assemblies. And right, it can be done using interfaces.Actually, "compiled in other assemblies" is not clear. You can statically reference the assemblies where you define forms and/or other components and than...
25 May 2011 by Abhinav S
You might also want to look at reflection. This[^] excellent article describes this when you want a form to be loaded in unreferenced assemblies.
28 Jun 2013 by zkuzet
I have MDIForm1 and Form1 as child in vb6If I open two documents and click on the buttons to execute the program in one and in the other, the program is executed in active form1 and the other waits. If another form1 Set Active then it continues to execute in the first standing.Can the...
30 May 2012 by Aero72
Dear all,I'm trying to find a way of using an MDI Child (which happens to be a user control) within a TabControl on the MDI Parent. I am able to put several instances of the user control onto a tab using...Form NumForm = new NumericalViewer();NumForm.TopLevel =...
31 May 2012 by Sergey Alexandrovich Kryukov
Here is the best way of using MDI child: never using MDI. Here is the idea: who needs MDI, ever? Why torturing yourself and scaring off your users?Do yourself a great favor: do not use MDI at all. You can do much easier to implement design without it, with much better quality. MDI is...
31 May 2012 by Maciej Los
Take a look at similar discussion: How to Open Child Window in tab[^]
21 May 2015 by Asgard25
We have an application that uses a parent form as a mdi container and all other forms as child forms.On The parent form we have a control that has our 9 menu options on it, so that it doesn't have to be on each child form, but gets hooked up. So it's basically a global menu, but it causes a...
22 May 2015 by bojammis
I have worked with client's applications that have MDI forms and their application cannot be modified otherwise, so support for the MDI pattern must be maintained. So I hope this helps.I would look into all the form’s members that deal with MDI forms. Two that are useful...
6 Mar 2023 by Robert Gustafson
Simplifies working with ToolStrip-type menus and tool bars for MDI-parent and other forms; also works with ToolStrip-type context menus
16 Jul 2018 by saide_a
I have a List control which about 280000 items should be added to that and then display. it takes about 4 minutes for me and my UI goes disable during the time. how can I reduce the Delay time? What I have tried: pTable = new CListCtrl; CString strtemp; for (unsigned int i = 1; i
16 Jul 2018 by Ajcek84
Have you considered paging or infinite scrolling? Items may be created/retrieved in a different thread but updating a control always blocks UI thread unless the control supports some kind of virtualization. The best approach is add items by parts (for example 200 items at a time) but you should...
16 Jul 2018 by Jochen Arndt
Who will read (and scroll through) 280,000 items? A solution would be using a virtual list control that handles only the items actually visible. See Virtual List Controls | Microsoft Docs[^]. For a non virtual list control you can (and should always even with smaller lists) disable the screen...
6 May 2014 by the vacuum
I have developed an MFC MDI application for image viewing with one view and document class.I need to display upto four image files in the same application window. Also the user can have provision to dynamically select number of images files displaying( ie sometimes user will need to display;...
6 May 2014 by leon de boer
It actually doesn't matter how you do the physicals on screen to do it you have to have the data stored and accessed by a Handle of some form.The handle could be a file handle (temp files), a global memory handle (all the data in memory) or a pointer to storage class object like a stream or...
5 Feb 2018 by gautam solanki
Hi I am developing one sample application by using WPF MDI. I used User Control as child form. It works fine but I am getting child forms titlebar and its border so it occupies space in MDIContainer. I want to remove that space. So anyone can help me to remove that space? Please see image :...
5 Feb 2018 by Graeme_Grant
Check out: MahApps.Metro Documentation[^] and GitHub - ButchersBoy/Dragablz: Dragable and tearable tab control for WPF[^] for a more modern MDI-like interface like Google Chrome as an alternative...
5 Feb 2018 by Pete O'Hanlon
From what I can tell, WPF.MDI is a lookless control. This means that you can skin it pretty much anyway that you want. If I were you, I'd take a copy of one of the existing themes[^] and play around with that to get the effect I wanted.
19 May 2014 by the vacuum
I'm developing an image viewer MFC MDI (with one CView and CDocument)application for displaying a number of images files(stored in PC) in single application window for comparison . The number(upto 4) of images to be showed and its order will change dynamically with user preference. So I created...
10 Feb 2015 by Member 4276496
I have made a paint program. The main form is Form1. A Child Form, called FormCanvas, has a pictureBox with a Bitmap Image on which I do all the drawing. From the main Form1 the user can call up several Dialogs to change the Images brightness, contrast, etc. Right now these Dialogs are set up...
10 Feb 2015 by OriginalGriff
Don't. Pass the info to the main form and let it do the work.Transferring information between two forms, Part 2: Child to Parent[^]
10 Feb 2015 by Sergey Alexandrovich Kryukov
Here is the idea: who needs MDI, ever? Why torturing yourself and scaring off your users?Do yourself a great favor: do not use MDI at all. You can do much easier to implement design without it, with much better quality. MDI is highly discouraged even by Microsoft, in fact, Microsoft dropped it...
4 Mar 2017 by Dana Bell
I'm trying to access the variables in a child form. I am transitioning from a multi-form WinForm program to a MDI with a ribbon. A lot of the code in the child forms is the same and I would like to code as much is the parent form. I can access and modify controls in the child, but can't figure...
20 Feb 2017 by Graeme_Grant
Google Search is your friend... A quick search highlights many possible results that could help you. Have you tried doing any research?
20 Feb 2017 by Ravi Bhavnani
I think you're approaching this problem the wrong way.If you want to re-use code that populates a list control from a collection or data source, abstract that functionality into a method in a new helper class (e.g. ListViewHelper) like so:public static PopulateListView (ListView...
4 Mar 2017 by Dana Bell
While I did not find a way to access variables in a child form directly, I did figure out a way to execute code in the child form from the ribbon. 1. Create a label on the child form2. Make it public (or protected)3. Add a TextChanged event for the label4. Find and change the...
2 Sep 2012 by MR. AngelMendez
Hi, I made two separate programs, the first one is supposed to capture the other program and the second one is supposed to show a messagebox stating that it has been captured.first question: How do I get program 1 to capture any running program, like a "black hole"?second question: How...
2 Sep 2012 by AmitGajjar
Hi,What you are asking may be possible but i am not prefer to access running program directly. Instead what i suggest you to create one Intermediate XML file for transmitting data between both the application. I don't know what you would like to achieve from attaching both the...
23 Jan 2019 by Chopin2001
I don't know how to remove menubar from dialog that inherit CDockablePane, create by CreateEx function in mainframe of MDI(MFC). My Dialog's problem is have a menubar that have a 'X' icon for close. I want to remove that. Thanks. What I have tried: m_wndOptionBar.CreateEx(NULL, NULL, this,...
23 Jan 2019 by Michael Haephrati
If you go over all Windows styles[^], and Extended Windows Styles[^], you should find the answer. Also you can remove the close button using the following code (assuming you get a handle to hwnd): HMENU hMenu = GetSystemMenu( hWnd, 0 ); int nNbItems = GetMenuItemCount(hMenu); ...
28 Apr 2014 by the vacuum
I have developed an MDI MFC image viewer application for simultaneously viewing and comparing more than one images. In my application I need to implement dual monitor support which can view the displaying images in two monitors connected to the system and viewer should have provision to arrange...
19 Jun 2014 by lmilano
I have an mdi form with a panel anchored across the top. I want to load a child form in the remaining client area below the panel. When I use DockStyle.Fill, the child form fills the whole mdi client area and the top of the child form is hidden beneath the panel. I am using C#.Thank You.
19 Jun 2014 by Sergey Alexandrovich Kryukov
Basically, MDI is not designed to work with child controls.Here is the idea: who needs MDI, ever? Why torturing yourself and scaring off your users?Do yourself a great favor: do not use MDI at all. You can do much easier to implement design without it, with much better quality. MDI is...
26 Oct 2015 by Member 12041961
I need to insert some data from an edit control in a double linked list.How can i make this?My struct looks like this:typedef struct adr{ char anrede [5]; char vorname [51]; char nachname [51]; char plz [8]; char ort [60]; char strasse [51]; char land...
26 Oct 2015 by KarstenK
It is business as usual: you must do your house-keeping.You must allocate you address struct in memoryadressen * addr = new adressen;//.. fill with data// add to listinsert( node, addr );and delete it when your done.The inserting means that you "hang" the new between two...
26 Oct 2015 by CPallini
Get the CEdit text (you may either use the GetWindowText[^] method or, if appropriate, the DDX mechanism[^]) and copy it in the right adressen field.Of course, you have to first allocate memory for the adressen structure.As a side note, you are using C++ just like C. Why don't you take...
24 Dec 2014 by Dev O'Connor
Afternoon All,I am using a left hand ribbon control i made to load up MDI Child Forms, the problem i have is that some of them have a significant amount of controls on them so takes a few seconds upon activation to relase the thread.My concern here is that if i multiple click the ribbon...
24 Dec 2014 by CHill60
You could call the Application.DoEvents[^] method immediately prior to re-enabling the control. It should consume the waiting messages - i.e. they will fire but be ignored because the control is disabled. Please take note of the warnings and suggestions on that link.You could also consider...
13 Jul 2019 by benjweston
In a win32 mdi desktop app, how would you place an edit control in the mdi client area (just like the Output window in Visual Studio when it's docked at the bottom of the main window)? I'm doing an OpenGL graphics app and to complement using mouse input and getting coordinates from the cursor...
13 Jul 2019 by Richard MacCutchan
Why not just create it as another child (Edit) window and let the MDI window control its positioning? See How to: Create MDI Child Forms | Microsoft Docs[^] for some sample code.
30 Apr 2014 by the vacuum
I have developed an MFC MDI application targeted for a dual monitor application scenario. Two monitors are connected to my PC through a graphics card and are set in extended mode. Therefore my desktop is occupied in entire area of two monitors. But I opening the application its only displaying...
14 May 2021 by tracam
Hi, I have a main form in Visual Studio C# which has the IsMdiContainer set to True. I tried to open a child form using frm_edit_s = new frm_edit_sensor(); frm_edit_s.FLG_parent_form = this; ...
14 May 2021 by RickZeeland
See the note here: Form.MdiParent Property (System.Windows.Forms) | Microsoft Docs[^] Quote: If there are two MenuStrip controls on an MDI child form, setting IsMdiContainer to true for the parent form merges the contents of only one of the...
16 Dec 2019 by try.test.abc
Hello All, Please help.. In my project i have datagridview and i have created a cellValidate event of it and in it i have put the code of e.cancel = true for certain condition like formatting and decimal validation... now it gives error when i press MDI form's save button to save grid...
16 Dec 2019 by OriginalGriff
That is by design: it's is exactly what the Validation event is there for. If the data in the cell isn't valid, it shouldn't be saved - and that is exactly what the system is trying to do: prevent invalid data getting into your backing storage.
14 Nov 2013 by JOE Heart Under Blade
halo, i have a mdi parent my mdi parent are contain menustrip and when i click one of the menustripitem will be call or popup one of form child.i m setting up a background image to my mdi parent.when i import the image the is no problem appear.i can set and change the background...
14 Nov 2013 by Sergey Alexandrovich Kryukov
This is not so easy and probably requires P/Invoke, like finding MDI client window handle via raw Windows API handling WM_ERASEBKGND message. For some background: the real parent (from the stand point of Windows API parent-child relationship at the level of Windows handles), the MDI children are...