Windows GUI C++ Programming - c++

I want to learn C++ GUI programming using Visual Studio 2008. I'm not sure where to start though. I learned C++ in high school, but not GUI. I've been doing C# for about 3 years now and thats how I "learned" GUI programming. Now I want to learn how to write GUI's without the use of the .NET framework, so where do I start?

Charles Petzold's "Programming Windows 5th Edition" is the Bible for Windows programming.
http://www.charlespetzold.com/pw5/

Since you say you've been doing C# GUI programming for about 3 years, I'll assume that means Windows Forms. One way to dip your toe in the water is to remember that WinForms is really just an object-oriented wrapper around user32. So load up Reflector and take a look at the way some of the controls are implemented. You'll see that these strange messages like WM_PAINT and WM_KEYDOWN are pumped to the WndProc of the various controls by Windows. In plain old Win32 or MFC programming, the same thing is still going on. Doing this will let you slowly peel back the layers of the onion; you'll get a better feel for how Windows Forms works, too. From there, I'd recommend picking up Programming Windows by Petzold; it's old, but the native APIs in Windows don't move around that much. Have fun!

MFC is almost outdated now. I would recommend to use WTL instead .
Well it is also not a good idea just to start programming for GUI in C++ when there are so many good frameworks available like QT cross platform framework.

Some heretical opinions...
I wouldn't recommend C++ for writing complex Windows GUIs - language/library combos like C# or Delphi are so much more productive. If you want to get into C++ programming I'd suggest using it to write a multi-threaded server of some sort - a simple Web server would do for starters.
And if you really want to understand the underlying Windows APIs, I think there is something to be said for writing a simple application (like, say, a simplified version of notebook) in C (not C++). You'll only want to do it once, but you will learn a lot in the process.
And before anyone starts madly down-voting, let me say that I am a C++ programmer of over 20 years standing, and really love the language.

Would it be OK with you to write GUIs in VC++ using Microsoft Foundation Classes or MFC? That is how I would and have written VC++ GUIs in the past.
There have been many books written on MFC over the years. I'm sure any one of them will do nicely. You may find in the literature the reference ATL which is a Microsoft iteration on STL. MFC and ATL kind of merged over the years so anything ATL is also applicable to an MFC app these days.
Good luck and have fun!

Ah I know how you feel, old interpreted languages programmer that want to know the magic behind compiled programing. Well I can't find the tutorial that I used to learn windows programing, but just know that there is good win32 tutorials around, so you don't waste your time buying a book just yet.
I found it: http://www.relisoft.com/win32/index.htm
Neatest tutorial around, trust me.

As of now (Windows 8), WinRT, a completely new API has been brought to the audience by Microsoft and I'm quite excited about it. Never done MFC programming, but saw some code samples and they look weirdly 90's C-style (modern C-style is often better!). So, without going to start directly with MFC, I think I will start with WinRT
:)

Related

How to go about creating a windows application

I've been looking at a lot of different options for creating a GUI windows application. Win32, Windows forms, MFC to name a few. I know my C++ well, I just need some advice on where I should start learning some GUI for windows. Thanks!
Qt has helpful tutorials. Easy to learn. Open source. Many resources on the web!
MFC is quite a dated technology now; The kinds of books/tutorials available for it are similarly aging. QT is becoming far more widely used and is likely a much better starting point from a learning perspective.
There are of course plenty of other alternatives beyond C++; C# and .NET are good choices if you are specifically interested in development on Windows. C++ programmers tend to find their feet in C# quite quickly, although any new language/environment does of course have an extra learning curve
I would look into Qt, OpenGL and SDL (Simple Directmedia Layer).
Qt provides an easy way to build GUIs, I would (loosely) compare it to Java's Swing.
OpenGL and SDL are more about plain graphics, both being used in various games and applications.
I use MFC commercially and I'd have to say for strictly GUI/Windows apps, you might want to look at C# (either Winforms and/or WPF). MFC is getting pretty dated. You can get a lot more done in the same amount of time with C#. Sure it might run a tiny bit slower, but for UI apps, I think programmer time is much more important metric than execution time.
If you want to use C++ for UI, maybe have a look at Qt. It is continually updated/enhanced and is not limited to a single platform like MFC is.
Good luck!
It is as helpful to develop a windows based applications! their are many open sources and Ides to develop windows applications.
One of them are Visual Studios, it is an IDE ie..(Integrated Development Environment) developed by Microsoft for both windows and web based applications development.As it has an advantage that an individual should be proficient in any programming language that he/she knows about.This IDE is integrated with the .net framework which have the capability to manage the code and compile with the help of Microsoft Intermediate Language (MSIL)and CLR common language at Run-time.The type checking is handled by Common type Specification for all Programming languages.JIT compiler is a compiler to execute to semi finished code and turns to code in to bytes.The main languages are handled by these IDE are C++,VC++,C#,Visual Basic,F#,J#..etc

Modern, native way of creating WinAPI GUI apps in C++ [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
First, I know this is kind of common question, but I could not find the exact answer I am looking for.
I have done many projects in Java using Swing. Starting by just coding the GUI, then later moving onto GUI designers. This proved to be a very quick and easy way to build GUI apps.
But now, I need to move to C++. I am beginning a project which uses a lot of HW resources (DirectX, OpenCV, etc...) I know there are Java libraries for these technologies. However, C++ is definitely the right way to go, considering the internals of this project.
I know C and C++ languages well from MCU programming. Also, I have read many articles on native WinAPI programming, Windows internals, etc. I think I have enough knowledge to start. I don´t want to worry much about GUI design, but it must look appropriate.
I know there are few basic options: Pure WinAPI, MFC, WTL, Qt... I would be very glad if there were some kind of GUI designer tool, but from my research, there is not. There is the MFC wizard which helps to create a basic window, but it is not a designer. The closest thing I found was Qt. But from what I read, it is not using WinAPI for drawing, for in future look and feel of Qt written app can differ from native Windows look.
So, to summarize, please, if you are experienced with creating native Windows C++ Apps with GUI, what would you recommend to me? Specifically, is there any tool or designer I missed?
(I am using Visual Studio 2010 professional, since I have it free thanks to the DreamSpark project)
I recently used Qt4 and was very pleased with the API. I found it straightforward, well documented, and the code is extremely concise.
Qt does an extremely good job of emulating the target OS look and feel (as #In silico pointed out in the comments, Qt actually draws everything itself and does not use native components) Regardless, this can be coded by hand or visually through the GUI editor in their IDE, Qt Creator. If you go this route, I recommend creating your initial GUI project (.pro file) there, then importing it into Visual Studio via the Qt Visual Studio Add-In.
Slots and signals, Qt's event/messaging system, is also worth mentioning. Yes, it's critical to GUI programming, but could also be extremely useful in lower-level code.
I expect Qt would work well in your project, but as always, create a few simple tests to ensure the technologies will work together feasibly.
Here are a few hints:
Don't lock yourself into C++. C# and Java (for instance) can be easily interop'ed with C/C++. (Through PInvoke or C++/CLI for the former and JNI for the later). C++ may not be the ideal language to write a GUI quickly.
Your requirement for "native windows look" is arbitrary and you should think it over. Is that really what you need ?
Winforms. It's an older technology but is still widely used. You use the API from C++/CLI or C# (or any .NET) language.
WPF, a more recent API but that will be harder to deal with from C++, (better with C# or VB)
One of the many GUI toolkit available on the market that have a C or C++ API (QT, GTK, wxWidgets, the VCL, ... list here). Some have "native" looks, some don't. Some have designers some don't. Some are free, some aren't.
If you need simple user interface i recommend use WTL - is simple, lightweight, header-only library, very good wrapper over WinAPI. In Visual Studio you can use form designer for creating windows and use WTL classes for implement interaction with user. WTL have poor documentation but WTL is looking like MFC.
If you want rich possibilities i recommend use Qt. It's very powerful GUI framework with great community.
You can use the C++Builder XE2 (Part of the Rad Studio IDE), which includes the VCL (Visual Component Library), the VCL is a wrapper over the Windows controls (and also includes custom controls) which increase the development productivity.
The wxWidgets c++ class library comes with a screen builder.
VCL is a good way to go. It has a GUI designer tool (Embarcadero Rad Studio XE6) fully native gui developer for C++ and Delphi
Depending on how strict your definition is, you could use .NET Windows Forms or Windows Presentation Foundation and plug logic in from C++, C++/CLI, and C#. That would not be a pure C++ solution. In fact, I wouldn't even necessarily advise using C++ in that situation. Simply using C# would be more intuitive and maintainable. WinForms and WPF have pretty awesome GUI designers though.

What is the best way to get started in GUI C++ programming?

So, I learned C++ (fundamentals) and I want to write software, however I have stumbled upon a problem where I don't know where to get started. It seems like learning C++ was the easiest part by far when it comes to understanding the libraries for the GUI construction the concept I yet don't fully comprehend. I searched a lot and couldn't even decide been a new guy on MFC, Win32 or Qt.
Qt C++ GUI seems like a fun and easy to use software with the definitions of classes available right there quickly.
With Visual's MFC I am seeing a lot of code upfront on the pre made project file and a lot of description of classes, however getting definitions is a bit slower as I have to go to the internet.
Win32 is apparently written in C and is not updated much?
A lot of people recommend Java and C# as well, but I am not interested in learning a new language when I don't have C++ set in stone and practiced with enough yet.
Not sure how to go about this.
Go with Qt if you envision porting your program to platforms other than Windows and/or your actual UI needs are relatively straightforward. But Qt, being "fun," abstracts you away from the Windows API, so if you find yourself needing to access features of that API not offered by Qt, then you'll be up the creek. So go with MFC if you're staying on Windows and you're building an application whose complexity or Windows-specific features may require more direct access to the Windows API. MFC provides a thin abstraction layer over that API; its concepts map more or less one-to-one with the API's concepts.
What kind of GUI do you want? Any framework should be able to do any kind of GUI, but some are optimized for certain work:
MFC is optimized for making applications that edit documents, like MS Office programs Word, Excel, Powerpoint.
wxWidgets and Qt (and .NET WinForms and WPF) are optimized for any sort of app that primarily uses widgets (textboxes, buttons, menus).
SDL is optimized if you want to draw stuff, like graphs or vector artwork.
I wouldn't recommend that you use MFC since it isn't a good fit for most applications, and also doesn't use modern C++ design, it's loaded with workarounds needed for stuff that was broken in early versions of Visual C++ and now can't shake those workarounds because of backward compatibility.
The Win32 API is actually really useful to know regardless of what kind of application you want to make, because it defines the rules for how the UI interfaces to the rest of the system. Yes, it's written in C, but this is to make it usable from any programming language, not because it's an obsolete design. Win32 API is highly object-oriented and uses polymorphism extensively.
Few things you need to be aware of:
If one day you want to sell a program written using Qt you might need to purchase a license.
If you feel like GUI applications/ GUI programming is what you want to do in general, for windows platform you better learn WinForms or even better WPF (with C# of course).
If you just want to quickly put up simple GUIs for your C++ programs for learning purposes, and you don't care much about learning the frameworks and licensing issues, just go with Qt or wxWidgets.
MFC is outdated. If sticking with C++ on Windows, I recommend you to lean C++ CLI.
However I suggest you to learn c# directly since c# is the mainstream language in .Net world.
For GUI, the windows world is now dominated by WPF.

what after the basic c++?

i studied basics of c++ in college, we used the book object oriented programming in c++ by robert lafore.
i studied till pointers (almost half the book) and i still feel outdated using the console and not doing something other than that (forgive me for my ignorance) i want to do windows simple apps and knowing how to employ the little i learned.
the problem is when i open a win32 project in Visual studio for example it opens a lot of stuffs and many .cpp's and .h's .
is there a way to comprehend that and walking on the right path?
the code is complicated to me and mind teasing is it suppose to be like this ?intended to be like this for beginners ? is there a reliable tutorial to introduce me to that or do i need to learn the advanced concepts of c++ like templates and virtual functions and file i\o or they are not necessery ?
thank you.
There are simpler languages to learn programming in then C++, and less complicated concepts to be mastered in simple CLI applications. In fact, using C++ to write GUI software is probably one of the hardest things to learn to do well. If you are intent on learning only visual programming, and only in C++, then I suggest trying the programming toolkit QT (http://developer.qt.nokia.com/resources/getting_started/) as you will have a window on the screen faster and more logically then nearly anything else.
Otherwise, pick nearly any interpreted (VB, Python, Ruby) or quasi-compiled (Perl, Java, C#) language and work through a command line tutorial first, as your progress will be much more likely.
Create an empty project in Visual Studio, then it won't create a bunch of .cpp and .h files that you don't care about.
After that, to learn how to write a windows application from scratch, read Programming Windows by Charles Petzold, or google a windows programming tutorial on the web.
Later, get books by Jeff Richter (Windows via C/C++) to learn more advanced windows programming concepts.
win32/Visual Studio is not a good way to learn GUI programming --Visual Studio generates too many mysterious and unreadable pieces of code and the win32 API is a C API which carries a lot baggage from from the early versions of windows.
It would be much better to use a more organised and conceptualy cleaner framework like Qt or WxWidgets to learn GUI programming.
I would actually recommend you use wxPython to learn the basics of wX and switch to the c++ interface when you have a good understanding of the widgets etc.
Most of the c++ code you need for a GUI is just boiler plate property setting and exception handling which wont teach you much and is pretty tedious.
My tip on getting a hang of windows programming:
Read The Forgers tutorial.
Instead of choosing a project with stuff in it, just choose a blank project and start from scratch, it's actually not that hard once you get the hang of it. However, a basic Win32 program consists of approximately 70-100 lines, because:
You have to set up a unique window (this includes registering your window in Windows and creating it correctly)
You have to handle all the messages that are sent to your window
You have to react to the messages that are sent to your window
Especially check out the Simple Window that TheForger created, then start fideling with the flags (dwExStyle and dwStyle) in CreateWindowEx, check out the wndProc function and see what the messages are (I think the most interesting you should focus on is WM_CREATE, WM_PAINT and WM_SIZE). Hopefully, after some time you will get a feel for what everything is and how it interacts.
It takes some time but I guess most stuff in programming does if you want to learn it. When you have your basic knowledge of a window, you should probably see how you should move on, if you should start with 3D (DirectX or OpenGL) or stay with 2D (GDI+). Or take up Qt like suggested by James Anderson, it really depends on what you want to do. But I do think that you should take that decision then and not now. StackOverflow will most likely assist if you ask what direction you should take if you know what kind of a project you want to do.
You need to start somewhere. So yes, you need to learn all those things you mentioned and then some. The then some includes writing console apps until you really understand whats going on. The only reason I can speak is because I am in a similar boat. I would say, from the sound of it, that I am probably more "advanced" than you and I still find doing some assignments/projects in the console challenging.
The problem is: Windows and stuff is complicated, you have all these events (clicks, keys, mouse stuff etc) and you are interacting heavily with the operating system. It is good that you start with console apps, because there you can focus on the actual programming, i.e., learning how to use loops, functions, classes etc.
To learn how to make windows, you should absolutely understand what classes are and how to use them, because in my opinion, all window toolkits worth learning make use of classes.
So, how does this windows stuff work? The good news: A lot of work has already been done. No need for you to re-program a "print file"-dialogue, no need to hand-draw windows with their symbols and menus etc. This is all readily available in so-called frameworks, and there is a bunch of them out there. You can use the Microsoft Foundation Classes (MFC), or Nokia's Qt or wxWidgets etc.
Google for tutorials on these, and this should get you on the way. First look around which framework looks best to you and then do the Hello World examples.
Once you gain some experience, you'll see that it isn't THAT scary. The only scary thing is the unknown that is yet to be conquered.
(A more gentle introduction would be to first do Java/Swing as I find this VERY easy, but the C++ alternatives aren't too hard, really)
Just play around visual studio if you want to get familiar with Visual studio or any IDE. VS does lots of things on behalf of you. Its interactive, select one option, look into auto generated files .h or .cpp, compile it. If you get any error google it. I myself learned this way.
For learning C++ lafore is good book to start with. The most important way of learning any language is writing lots of code. Dont get tempted to look solution in book. The best way is:
a) Read the problem properly
b) Write your logic on paper first
c) Identify interfaces
d) Convert your logic into programme
e) Compile it
f) remove the errors
g) remove all the warnings

What's the C++ GUI building option with the easiest learning curve - VS/Qt/wxWidgets/etc.?

I'm looking to be able to build GUI applications quickly and painlessly as possible. I'm competent (though not expert, and have no formal training) in C++, but have never used a GUI building toolkit or framework or anything. I am not a professional programmer and am totally inexperienced and ignorant when it comes to building GUI apps. Have spent hours researching trying to figure out what to do; only getting more confused and discouraged though.
Qt and wxWidgets seem like the most popular options for cross-platform apps, though cross-platform isn't necessarily all that important to me; Windows-only is fine if that means the fastest learning curve.
Qt seems cool and the Qt Creator is sweet looking with lots of good demos, except it has its own classes for everything, and I'm not overly keen on learning a bunch of stuff that's only applicable to the Qt platform itself rather than more generally. I suppose I could avoid using the Qt classes except for the GUI stuff where I have to use them, but I have no idea how wise or unwise that would be.
I was thinking Visual Studio would have the smallest learning curve, but when I open a test GUI app, I see a bunch of foreign looking stuff like carats (^) all over the place - I found online that these mean "handles", which I have trouble even understanding the definition or purpose of ("sort of like pointers but not really" is basically how I've read people define them).
I know pretty much nothing about wxWidgets, or how it compares with Qt.
So every option has a big learning curve - and ideally I'd like to know which one minimizes the time you have to spend learning the toolkit/framework itself. Since I'm likely never going to be making money from the programs I create, the time I spend learning a specific toolkit would be pretty costly. I just want to be able to make a functional program using the C++ knowledge I have, but in GUI form. At the moment it seems if I want to make a GUI app, I'd have to spend way more time learning the GUI framework I'd use than writing the functional part of the app itself.
Any input from people wiser and more experienced than me would be appreciated :)
First and foremost, start simple. There's a lot to the subject. If you are finding it hard, don't try and take it in all at once.
Most of the good GUI packages have tutorials. The best advice I can give is that you try each of them, or at least a couple of them. They are the best short introduction you can have to the library you choose and if they are any good they narrow down what you need to absorb at first. That will give you some basis for comparison, because they are each trying to do very similar things (and you will see some of them before you are done), but they have different feels. You will likely find you have a preference for one and that's the one to get serious with. It will also give you a sense of what's hard about GUI programming as separate from the particulars of one package, which, if you have only used one, you won't have seen. Personally I find this sort of knowledge very helpful, because it makes me less intimidated by particulars.
Here's a list of tutorials in one place, though you have likely seen them already:
Qt's tutorial
WxWidgets' tutorial
Gtkmm book. Not quite a tutorial, though there are lots of examples.
.NET tutorials, either for WinForms or for WPF.
Second, it sounds to me that you need to get some in depth understanding of the concepts of GUI programming, not just a particular library. Here there is no substitute for a book. I don't know all of them by a long shot, but the best of the bunch will not just teach you the details of a toolkit, they will teach you general concepts and how to use them. Here are some lists to start with though (and once you have titles, Amazon and Stack Overflow will help to pick one):
List of Qt books
WxWidgets book (PDF version)
There are tons of WPF and WinForms books. I can't make a good recommendation here unfortunately.
Third, take advantage of the design tools (Qt Creator, VS's form building and so on). Don't start by trying to read through all the code they generate: get your own small programs running first. Otherwise it's too hard to know what matters for a basic program and what doesn't. The details get lost. Once you've got the basics down though, Do use them as references to learn how to do specific effects. If you can get something to work in the design tools, then you can look at particular code they generate to be able to try on your own hand-written programs. They are very useful for intermediate learning.
I'm not overly keen on learning a bunch of stuff that's only applicable to the Qt platform itself rather than more generally.
I second the comment of GRB here: Don't worry about this. You are going to need to learn a lot specific to the toolkit no matter which toolkit you use. But you will also learn a lot that's general to GUI programming with any of the decent toolkits, because they are going to have to cover a lot of the same ground. Layouts, events, interaction between widgets/controls, understanding timers -- these will come up in any GUI toolkit you use.
However do be aware that any serious GUI package is an investment of time. You will have a much easier time learning a second package if you decide to pick one up, but every large library has its personality and much of your time will be spent learning its quirks. That is, I think, a given in dealing with any complex subject.
I suppose I could avoid using the Qt classes except for the GUI stuff where I have to use them, but I have no idea how wise or unwise that would be.
You do not need most of the non-GUI classes of Qt to use Qt's GUI properly. There are a handful of exceptions (like QVariant) which you'll need just because the GUI classes use them. I found you can learn those on a case-by-case basis.
Which is the easiest to learn is really going to depend on how you personally learn.
Personally, I've found Qt to be the easiest to learn so far. The GUI classes are rather nice to use, but I've found the non-GUI classes to be excellent, making it easy to avoid a lot of common issues you'd normally get with a more basic API. The documentation is excellent, IMO, as are the books, the examples, etc. It's also being very actively developed, with a few new technologies coming in the near future (like DeclarativeUI).
I've found Visual Studio/Windows API/.Net to be a good bit more complicated to learn. The API documentation on MSDN is rather complicated and not really organized in a manner that I find intuitive.
I've tried learning WxWidgets a few times, but I've never liked the API documentation.
All this is just my personal experience, YMMV of course. I'd say just dabble in all of them and see which one takes you the furthest, it won't hurt to try multiple.
As a person who learned C++ through Qt, I can only say that they work very well together. C++ purists (like I have become) will find lots of things in Qt not to their liking (the moc preprocessor, e.g., and the continued absence of exceptions for error reporting), but looking back, Qt provided a very gentle introduction to C++ for me.
And if you're like me, you throw in a handful of boost libs in each Qt project, because we want to write "real" C++, not the softened thing Qt uses :)
I would suggest wxWidgets. To me, it's pretty intuitive and looks nice.
Code::Blocks was built with it, so check that out to see if you like the graphics.
There are also a slew of bindings for wxWidgets, such as wxPython, wxErlang, and others, so if you decide to switch off of C++, you can take wxWidgets with you.
I also use wxWidgets and use it all the time for Windows-only applications (the only downside is that wxWidgets is notorious for large .exe filesizes, which may or may not be a problem for you). I found it very simple to use from the start, especially when combined with a GUI designer (personally I use wxDev-C++).
I've never used Qt, so I can't speak to its simplicity, but I doubt the difficulty is on a vastly different scale than that of wxWidgets. However, what I can say is that no matter what API you use (wxWidgets, Qt, WinAPI, etc) your code will be "locked into" that particular platform, so don't worry if you feel that learning Qt will lock you into the Qt platform (because the same thing will happen with any of those APIs).
If you're working solely on Windows however, you may want to do a few simple programs with WinAPI first. That way you have a basic understanding of the lowest level of Windows GUI programming before you move onto Qt/wxWidgets. That said, if you're really into cross-platform programming, then don't worry about that and go straight into Qt/wxWidgets.
I can't intelligently comment on the learning curve aspect, but a quick survey of StackOverflow questions shows about twice as many Visual C++ questions as Qt questions. Probably means that there is a larger support group in place for Visual C++. Might make learning it a little easier if there are more folks to help out.
No matter what you pick, I am quite sure it won't be easy and painless.
Having said that, I know that in some schools they use FLTK because they consider it relativelly easy to learn. I have never tried it.
In my everyday work I use WTL which is as close to the system as it gets while still providing some level of abstraction over pure Win32. I am not sure if I would consider it easy to learn, though, especially given the lack of documentation.
I recommend codegear C++ builder (previously known as borland C++ builder) from codegear which comes with a 30 trial. The nicest thing about it is that the GUI provides you with components that you drop onto a form in a WYSIWYG fashion and make functional by adding code to handle the events it fires. It comes with a whole bunch of compontents out of the box and you can add 3rd party components to it too, like the awesome ExpressQuantumGrid from devexpress, or write your own. It's very powerfull if you know what you're doing but intuitive enough that a beginner can write a database CRUD application in about 20 lines of very simple code.
Since nobody has mentioned it yet, for the sake of completeness, have a plug for the Fox toolkit. This is the one I used last time I did any C++ UI work of my own volition. There are also binding for this to Ruby and Python (the latter being many years out of date, though).
In general, the choice of a toolkit for self-directed work comes down to personal preferences for
the layout manager style
the event handler registration style
How native the widget set looks/can be made to look
If cross-platforming is not necessary, try .net + msvs or delphi. easy, all-in-one, no pain.
Qt is the best option for you. It's the easiest to learn, the most elegant and powerful and it is completely free.
Visual C++: This is an IDE, but it comes with its own GUI library called MFC. MFC is an old library with many quirks and it is difficult to learn and use. Many C++ programmers use it on Windows because it comes from MS, it's fast and it's free if you buy Visual C++. Since VC++ is an IDE, you can also use wxWidgets and Qt with it, although in your particular case I would recommend Qt Creator instead.
You seem to have experimented with Managed C++. Don't use that, even MS recommends that you only use Managed C++ as glue between C++ and C#.
wxWidgets: This one was a strong contender up to the day when Qt became free for commercial projects. It was always in the shadow of Qt and it is known that the documentation is not very good and the API is not as easy to learn as Qt's. Cross-platform MFC would be a good way to describe it.
C++ Builder: Borland made too many mistakes with C++ Builder and ended up getting out of the dev tools business altogether. It was a good product and I originally learned Windows GUI programming in one of the first versions, but I won't use it any more. There are better options and it is too expensive.