Unmanaged C++ Windows Forms?

Posted on 2006-03-23
Last Modified: 2007-12-19
Not really a techy question, but an easy one.  Can one use Windows Forms for GUI design whilst using unmanaged C++ code?  Or am I stuck with MFC?  If so, are there any good net resources (eBooks, tutorials) on MFC, cheap or free?  I know nothing about it, and every time I try to muck around in VS.NET with MFC I just get more and more confused.  Starting a personal project soon and it's a requirement that I have a pretty GUI to go with the backend.

Also, any recommendations on alternate implementations of STL that are a bit more lightweight than the included one?

Thanks so much for any help.
Question by:dbunder
    LVL 11

    Expert Comment

    Visual Studio (at least the 2003 version) does not support the GUI form design for C++ (don't ask me why!). The best I've been able to do is design the forms using C#, then copy/paste and modify the code into the C++ project. I then made the changes needed to convert the C# code to C++ - not a terribly difficult undertaking, but certainily not a very clean way of doing it...

    Even if you choose not to do the cut/paste thing, using .Net instead of MFC is far easier.

    An article that details the C# to C++ technique can be found at
    LVL 20

    Accepted Solution

    hi dbunder,

    there are alternatives to ms windows forms. Qt is one, a very intuitive one. it has no need for managed code. if you going to
    implement an open-source project, you can use the GPL-license of it. if its a commercial-project, then you
    have to use the commercial license.

    here is the Qt-windows-open-source download page:

    good luck ;)
    LVL 1

    Author Comment

    never thought to use qt!  i think of it as a linux/bsd/etc. only library when it can be compiled and used almost anywhere.  i've no experience with it, but the docs are great and the featureset is awesome.  may just end up doing that, thanks!  extremely cool that qt designer integrates with visual studio, too.

    any comments on a faster, more compact stl implementaiton?  i'll have to be using it a lot in my project, and i know the memory usage can get pretty hefty with the standard one.  i've heard of a few lighter ones, i just don't remember what they were called.

    *crams in more questions*

    are there any tricks to keep executables built with VS.NET's compiler with small file sizes, fast execution (minimum overhead), etc?  i've never been able to figure out how to get rid of all that extra junk microsoft's compiler adds to your executables and libraries.  a prime example for what i'm looking for is the tiny filesize, memory footprint, and speed of an app called utorrent.  the guy who wrote it must have had some tricks up his sleeve, but he ain't talkin'. ;)

    upped the point value of this one by 65pts since i'm asking for more help.

    thanks to you both, and an advanced thanks for any more suggestions.
    LVL 1

    Author Comment

    welp, in lieu of getting any help with my other questions, ike gets it.  thanks ike

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
    Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
    The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now