Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi.

I'm now test docking application with C++ and C# language.

I've already made docking application using DockPanel supported by C#. If you want, I can send you the source.

Now, I've created project within MDIForm in C++ and tried to dock view generated by MDIForm from it's document. But the view is not docked from it's document.

Source code editor view on Visual Studio 2010 is docked well, but I can't dock view from MDIForm.

I think Visual Studio 2010 is also MDIForm. Am I right?
If yes, we can dock view generated by MDIForm from it's document. But I can't do it.

Please, help me.
Posted

VisualStudio is not an MDI form, if you want something like Visual Studio try AvalonDock[^].
 
Share this answer
 
Comments
WuRunZhe 15-Oct-13 22:21pm    
Oh, "VisualStudio is not an MDI form" is very shock.

I've seen AvalonDock with you help, but disappointed because it is WPF solution. I long for CPP solution.

However, I am extremely grateful to your help.

Thank you.
Sergey Alexandrovich Kryukov 15-Oct-13 23:46pm    
A shock? Hm... To me, it looks shocking that someone managed to see some lame thing as MDI in such are reasonable and convenient UI as Visual Studio. It does not look even close. :-)
—SA
Sergey Alexandrovich Kryukov 15-Oct-13 23:45pm    
Good advice, a 5, too bad OP won't probably go with .NET.
I added something else about MDI in my answer, will you take a look?
—SA
Ron Beyer 15-Oct-13 23:50pm    
Thanks Sergey.
In addition to Solution 1:

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 out of WPF and will hardly support it. More importantly, you will scare off all your users if you use MDI. Just don't. Please see:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^],
How to Create MDI Parent Window in WPF?[^].

I can explain what to do instead. Please see my past answers:
How to Create MDI Parent Window in WPF? [Solution 2],
Question on using MDI windows in WPF[^],
MDIContainer giving error[^],
How to set child forms maximized, last childform minimized[^].

Yes, I saw that you wanted to use C++ and MFC, but you mentioned C# as well. I never heard of Visual Studio style UI implementation with MFC, which is typically not used for creation of advanced UI, even though it is possible, in principle. And also, you can combine .NET and C++ solution, especially if you also use C++/CLI. You can develop pure C++ modules and use them in .NET application via P/Invoke, or you can develop C++/CLI project(s) which can be uses in .NET directly, or, finally, you can develop mixed-mode project(s) whiten in the combination of C++, C++/CLI and even C, wrap C/C++ code in C++/CLI classes/structures and then use them referencing this mixed-mode module as a regular .NET assembly.

Please see:

http://en.wikipedia.org/wiki/P/Invoke[^],
http://msdn.microsoft.com/library/en-us/vcmxspec/html/vcmg_PlatformInvocationServices.asp[^];

http://en.wikipedia.org/wiki/C%2B%2B/CLI[^],
http://www.gotw.ca/publications/C++CLIRationale.pdf[^],
http://www.ecma-international.org/publications/standards/Ecma-372.htm[^],
http://msdn.microsoft.com/en-us/library/xey702bw.aspx[^].

—SA
 
Share this answer
 
v4
Comments
Ron Beyer 15-Oct-13 23:50pm    
5'd!
Sergey Alexandrovich Kryukov 15-Oct-13 23:56pm    
Thank you, Ron.

I actually just added some additional information for development combined with .NET WPF and C++, optionally, with C++/CLI and C++. It might make the development easier for OP who wants to stay with C++.

—SA
WuRunZhe 16-Oct-13 23:47pm    
Thank you very much, I appreciate your help.
Sergey Alexandrovich Kryukov 16-Oct-13 23:54pm    
You are very welcome. Will you accept the answer formally (green "Accept" button)?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900