Reputation: 85
I have written code in native ANSI C++ that does some complicated numerical analysis. I would like to develop a simple GUI for it (a couple of radio buttons and text boxes). I hear that Microsoft "managed" C++ code makes GUI development easy, but is less powerful computationally than native C++.
So my question is, what would be the best approach for me to develop a simple GUI while retaining the power of the native C++?
Please note I have zero experience with developing GUIs and very limited experience with VS (I just use it to build console versions).
Upvotes: 1
Views: 331
Reputation: 4327
Use Qt. It compiles into native code. It has a rather steep learning curve and it is cross-platform.
Upvotes: 8
Reputation: 8402
Tcl/Tk is another option that integrates well with C and C++, is powerful and easy to learn, and runs in various platforms.
Upvotes: 1
Reputation: 283793
The "Microsoft managed C++" is C++/CLI, available in Visual C++ 2005 and later, and it is not "less powerful computationally".
You activate the managed features only for GUI code, and continue to compile your computational code as native. C++ interop is the fastest way to access native code and data from .NET, and since your native code is compiled with the same native optimizer, it's just as fast as ever.
From Visual Studio, the simplest way to get started is to use two projects: a native "static library" containing the computational code, and a managed "Windows Forms application" containing the .NET UI. Place a project reference from the managed application to the native static library so that the library gets included when linking. And just #include
your native headers as usual.
Upvotes: 4