views:

602

answers:

4

I find myself annoyed that Visual Studio comes with a fancy GUI interface designer and that it is only accessible to .NET applications and not even managed C++.

Is there any easy way to at least open up a C DLL type interface with unmanaged/foreign code?

+3  A: 

Windows Forms is very much a part of the .NET framework and cannot be accessed (at least not in any practical sense) from unmanaged code. However, it is possible to call it from managed C++ (I don't know about designer support in Visual Studio itself, but managed C++ can definitely use the Windows Forms library).

You might want to look into other C++ GUI options, such as Qt, wxWidgets, or Gtkmm.

Volte
+2  A: 

Managed C++ via Visual Studio has supported a forms designer since at least 2003 C++ with managed Extensions and C++/CLI projects allow use of the forms designer, here's a quick hello world example to help you find it.

ShuggyCoUk
+3  A: 

MFC is still a viable option for developing GUIs in Visual C++ 2008. Here is even a sample on how to integrate MFC with WinForms.

Peter Lillevold
A: 

If there is a will there is a way. If you are willing to jump through the hoops you can mix and match almost any combination of managed/unmanaged code.

Here is a nice (albeit old) overview: http://msdn.microsoft.com/en-us/library/ms973872.aspx

Eric