Click here to Skip to main content
15,886,629 members
Please Sign up or sign in to vote.
3.00/5 (8 votes)
See more:
Hai Every one,
Presently i am developing windows projects in VB.NET. I am looking to develop GUI's in CPP domain.
Can any one help me to do this.
Even i don't have any Development tool.
Plss suggest me any development tool.

Thanks in ADV.
Posted
Comments
Sergey Alexandrovich Kryukov 29-Jun-12 2:59am    
Why C++? Or is it C++/CLI? How to write -- not a valid question. Want us to write a book on UI development? Right in quick Questions & Answers? :-)
--SA
Himachandra 29-Jun-12 3:12am    
Helloww Mr..
I need help with directions....
I'm not asking you to write a book
I am asking that for doing this give me some direction.
Don't misunderstand . . . .
If you don't know abt cpp... sit calm
enhzflep 29-Jun-12 3:44am    
Ha, ha, ha, HA!
If SA didn't know about C++, he certainly wouldn't have amassed 5/8 of the points you've gathered in the past year, IN THE PAST 24 HOURS.

:ROLL-EYES:
Albert Holguin 5-Jul-12 18:54pm    
As you can see by the responses, you have quite a lot of choices, I'd recommend trying out a few once you get good at C++... then making up your own mind as to what's easiest to work with and gives you the most desirable result. Once you become an advanced user, you'll find there's shortcomings in pretty much any solution that you'll have to provide your own solution for.
shelby67 6-Jul-12 2:25am    
Book Options:
Sam's Teach Yourself C++ in 24 Hours ( http://www.amazon.com/Sams-Teach-Yourself-Hours-Edition/dp/0672315165 )
Ivor Horton's Beginning Visual C++ 2010 ( http://www.amazon.com/Ivor-Hortons-Beginning-Visual-Programmer/dp/0470500883 )


IDE options:
Dev C++ (old, outdated, and will never be updated, great for console, Win32 GUI)
Visual C++ 2010/2012 Express: (honestly the best out there, clean interface,needs some work on Intellisense features)
Turbo C++ 3.0 (really old school. 1993 release year. compatability issues)
CodeBlocks IDE (I avoid using this personally but others find it fine)

Here's my take on C++.
C++ is like a dumber version of C#/VB .Net. I have to use a different mind set when programming in C/C++ because you don't have as much documentation most of the time, lack of libraries and sometimes Intellisense in Visual Studio.

This seems a perfectly reasonable question. If you are already using Visual Studio then you have the IDE already. If not then you can get a copy of Visual C++ Express from this Microsoft site[^]. There are sample templates within VS to get you started, and there are articles here[^] on CodeProject to give you even more useful ideas. However, as Sergey Alexandrovich mentions, you really need to get a book on C++ to learn properly.
 
Share this answer
 
If you need a short answer: There is no fine solution. I used a lot of gui libraries extensively (in many languages), and the best would be a not too heavyweight widget based library without hacky solutions. There is no really good, clean solution for C++ unfortunatlely.
First, what is a widget based system??? I give this honours only to a gui library that uses object oriented design. Every control every panel, and every window is an object. In optimal case all you do is creating widget objects and setting their properties. Even building a gui hierarchy is just about setting the 'parent' property of the widgets. MFC and its friends are not widget based, and to make things worse, they are built on top of the heritage of low level win32 api solutions like dialog resources, and they are adding their own non-object oriented cr*p to the C winapi. These are so outdated solutions!!! Not to mention that its impossible to make such a program portable!!! (proting dialog resources???) If you are new to gui programming on win32, you have 2 choices. You can learn the the low level winapi + dialog resource stuff, and maybe later you learn MFC that builds on top of that, or you learn building gui with a nice widget based system. Using a well designed widget based system will eliminate a lot of bugs from your program, you will be able to build nicer guis faster, and usually a program based on a widget based system is much easier to make crossplatform, and its easier to change the gui system later. If you don't wanna build heavily size-optimized small executables (4k intro :D) and you are not that interested in the gui related winapi, then you dont have to learn it and definately go on with learning about widget based systems.

The C++ gui library that is the nearest to my expectations is Qt, but that library is heavyweight (I'm detailing it below) and uses code generator, its special syntax and its solutions might be very complex for a C++ beginner.

MFC: Terrible API, not even fully C++ style (not a widget based one). It has lots of methods which have the same name as the underlying wrapped winapi, but with different parameters. This confused me when I started MFC despite the fact that I was very good at creating gui with winapi. The poor api gives so complex solutions to simple problems (like splitters) that you can't memorize it even after years, you have to search the net and copy paste it right into your code every time. Resizable controls and dialogs need extra effort and helper libraries (you found some on codeproject). The gui you create with this can look nice windows native if you dont use a lot of cheap poorly designed custom controls.
wxWidgets: My opinion is nearly the same as about MFC, its a crossplatform MFC with some extra sh*t added to keep the stuff crossplatform. Note that MFC isn't only a pure gui library, its a big application framework that provides a lot of helper classes for other problems too (networking, file management, ...) but I don't recommend getting used to those helpers if you want to create crossplatform code.
C++/CLI: The .Net gui builder is nice and widget based. Haven't mixed c++ and .net yet, but iam agains heterogenous systems. One of my friends used .net to create gui for a c++ project and it was a big mistake with regrets. Debugging problems, slow UI, lots of bugs because it takes some time to get used to the common mistakes ppl make when they start using the gate between C++ and cli. Longer learning curve because you have to use 2 languages - the extra learning complexity is true even if you use C++/cli. .Net has very nice UI editor that uses anchoring to provide resizable layout (my favorite general layout mechanism), so this option seems to be an attractive one at first, but it has a lot of drawbacks. Visual basic, .net, and delphi use very similar nice gui building systems. Someone should have made one for c++, but noone started doing it. It would be completely possible by using the same workflow as JFormDesigner for java swing.
Qt: Widget based. Has a similar rapid ide as .net and delphi but I never liked its layout mechanisms and the controls that look native on neither operating systems. It has a signal-slot mechanism (a hyped and totally unnecessary feature) to send events between objects (events like button clicking), I never found out why is this better than an event listener, but it at least makes necessary to use a code generator with Qt that I don't like. You write your gui code in c++ and before compilation you have to preprocess it with the qt code generator. I would also mention that Qt contains a lot of other not gui related helper libraries like MFC that make this quite a big bloat and heavy-weight (however this isn't always a problem in a pc program). A nice feature of Qt that some complex controls have data model (like in java swing) that is a big black box for a lot of ppl who haven't worked with modern gui libraries, but if I wrote a gui library I would use data models in every controls.

If you want to understand the underlying C winapi for gui programming, then buy "Buy Programming Windows by Petzold." as Aescleal recommended. Thats the best book to start out with general winapi and GUI programming in C. Its in C and not C++ because most of the basic winapi is pure C without c++ support, so you use it as C even from C++. Even if you use a complete C++ library for some kind of stuff, its good to know the underlying C winapi that you library uses. This will be useful when you want to start writing your own rapid gui development tool for C++. :D I should start writing one based on the best practices of Delphi, swing and JFormDesigner, but I just dont want to sacrifice my time for it.

EDIT: My bad, I mentioned JBuilder instead of JFormDesigner. :D *corrected*
Added some explanation about widgets. What do I consider a widget?

ANOTHER EDIT: Always forgot to mention C++Builder, that was the sibling of Delphi from Borland. If I'm right that product is still in development. It is driven by exactly the same IDE and gui library as Delphi! We just stopped using it because of its custom C++ compiler (we preferred VC++) that had crash bugs. We also had some problems with compiling some crossplatform libraries but that was a minor headache. Maybe they have fixed those bugs already. I'm not using it because I'm a VC++ fun (most libraries support this compiler) and because C++Builder is not crossplatform (at least it wasnt when I used it). Still, if you want to know what I mean on gui development definately check out either Delphi(objectpascal) or C++Builder!!! What I didn't like in Delphi that it had no typesafe containers (they already introduced generics) and another stuff I miss from the gui is that they should have a data model, at least in the complex controls (listview, tree, ...). The custom compiler is needed because of the built in gui serialization support and some other fancy stuff - like the object method pointers (delegates) that are used to handle gui events.
Another problem is that I don't know if you can use it for free currently. But if pricing isn't a problem and you can stick to windows and the compiler of C++Builder, then this is definately a very-very nice development and gui building environment on windows!!!!!!! Especially if you are writing database handling applications because it also has components and table controls that support that!
 
Share this answer
 
v6
Comments
Stefan_Lang 6-Jul-12 11:37am    
If you need a short answer...
Maybe you should rethink your introduction ;o)

P.S.: ok, maybe I misunderstood the following sentence - did you mean that introduction to be an excuse for a long response? Fair enough, then.

Anyway, some very useful advice. But if I understand you correctly you don't like either solution? I'm not going to disagree: I would have thought QT or wxWidgets to be good suggestion, but I never got around to actually do a project with either. And I don't like the alternatives...
pasztorpisti 6-Jul-12 12:31pm    
Caught me! ;D You pointed out well, I don't like either solutions in C++. If I had to start a gui project in C++, I would be in trouble! :D MFC is terrible, a definite no-no (I would rather write a small framework for myself on top of winapi - just kidding :D), and the same is true for wxWidgets that copies the methods of MFC. I know that wxWidgets is a very popular (and overly hyped) framework, but I think most ppl use it because of the hype around it, and because they started to use that (and they already know its api) because one of their friends used and recommended that....... :D And because there were no free alternatives for crossplatform "C++" gui libraries that time. This was enough for wxWidgets to spread. Lot of MFC/wxWidget coders ususally have only shallow knowledge about the alternatives, this is why some coders like (and recommend blindly) these so much. I would probably choose Qt again, but that isn't perfect either. There are some really good design decisions in the gui libraries out there, someone should just merge them into a c++ gui library...
Stefan_Lang 9-Jul-12 4:15am    
I would rather write a small framework for myself on top of winapi
If the two of us ever happen to get caught in 'groundhog day' ( http://en.wikipedia.org/wiki/Groundhog_Day_%28film%29 ) then I'll gladly join you on that project ;-)

Luckily I've never had to program a GUI over the past ~15 year, so this isn't a problem I had to deal with recently. But due to my very bad experience before then I still keep watching out for better frameworks. I suppose if I had to choose a framework today, QT would be the first to check out. But I do hope that by the time this happens there will be something better around...
pasztorpisti 9-Jul-12 18:34pm    
Lol, this is a nice film! :D
There is a txt file somewhere on my hd with a list of my expectations from a gui library. Someday those dreams should come true but now I don't have the time for it unfortunately. I believe that even a marketable competitive product could be created with a few months of work.
Sergey Chepurin 7-Jul-12 4:33am    
Very good answer but to the person already experienced in GUI programming. "Unfortunately,
C++ does not provide a standard GUI library the way it provides the standard stream I/O library, so we use one of the many available C++ GUI libraries." (B.Stroustrup, "Programming: Principles and Practice using C++" Ch. 12[^])
Thus, C/C++ projects usually apply "lesser of two evils" GUI solutions available, either OS oriented, or cross-platform, commercial or free framework. But never C/C++ native one which does not exist.
Take a good look at C++Builder XE2[^]

This product is fun to work with, and the visual designer is very good.

You'll be able to create working programs just as fast as you are able to do it in VB.Net.

Best regards
Espen Harlinn
 
Share this answer
 
Comments
pasztorpisti 9-Jul-12 19:08pm    
+5 This is the best if someone wants REALLY RAPID C++ development on windows that involves a lot of gui development. Companies usually use Delphi and C++Builder to build thick clients for multitiered database systems but that is far not the only use of these gems!
EDIT: I have seen that they made this work on OS X. That is awesome! User opinions about that? Do they plan to port it to Linux like they tried Kylix with Delphi???
Bjarne Stroustrup has said that the biggest mistake that programmers make is trying to learn C++ at the same time as learning how to program a GUI. Writing win32 GUI apps in C++ can cause an unholy mess if you don't understand the programming language or the environment you're using.

First off I'd really heavily suggest you get hold of either Accelerated C++ by Koenig and Moo if you're an experienced programmer in a couple of languages or Programming -- Principles and Practice Using C++ by Bjarne Stroustrup if you aren't. Stroustrup's book has some GUI programming in it using an off the shelf class library which may be of some benefit to you even if you are an experienced programmer. Work through one or both of those and you'll be up to speed with C++.

There are two ways of programming Win32 apps in C++:

- Use the Win32 API. It's very low level and takes a while to get your head around
- Use a class library. They're usually fairly high level and take a while to get your head around

In either case grab a copy of "Programming Windows" by Charles Petzold, a reference to the Win32 API for C programmers. It's a must even if you never intend to call a Win32 function in your entire programming career as it shows you the structure of Win32. Even if you vote for using a class library then it's good as it shows you what your class library is hiding.

If you go for a class library then you've got loads of choices. Three (of many) are:

- MFC - it's a bit long in the tooth and not written in modern C++. It comes free with Visual Studio Pro and more expensive versions.

- WxWidgets - originally a cross platform attempt at MFC so it has many of the advantages and disadvantages of MFC with the bonus of write once, run anywhere.

- Qt - last time I looked (and this was over 4 years ago) it used several tools to effectively extend C++ to an extent I didn't particularly like - they weren't needed. From what I've heard (but not experienced) these have been removed and if that's true I could see it being a great platform to develop on.

To compile your code I'd suggest Visual Studio Pro (don't bother with the more expensive versions, they're not designed to support solo efforts) if you can afford it or the MinGW version of g++ (the GCC C++ compiler). If you go for MinGW you can take MFC off your list of possible class libraries.

So the TLDR version:

- Buy, read and inwardly digest a good book on C++. There's only a couple so be careful you don't waste cash and time. If it's got the name Herb Schildt on the cover please run for a can of petrol and a match and do the world a favour.

- Buy Programming Windows by Petzold.

- Try and choose a development environment - either Win32 or some sort of wrapping class library. You can see which ones appeal by downloading some sample code in each and seeing which one suits your style
 
Share this answer
 
v2
Use Qt [^]

Qt applications run both on Windows and Mac; and Linux. Plus, it is free (see conditions on that site).

Look at [^] for getting started.
 
Share this answer
 
Comments
Gevorg Hai 30-Jun-12 9:51am    
Qt is really very good choice !
If you come from VB.NET, then, i suppose, you just start to program in C/C++.
- The easiest way to create C/C++/Win32 GUI applications on Windows is by using Visual C++ Express 2010 (free, and probably last free C++ IDE from Microsoft, so get it now) + ResEdit[^](resource editor to add simple controls in your applications - ListBox, Edit Box, ComboBox, ListView, etc).
Then come professional GUI frameworks:
1. MFC - comes only with retail versions of VC++ and is considered outdated by many.
2. Qt - very feature rich, cross-platform and free framework, but big and not easy to learn for a beginner. Though, knowing Qt will add some points in your resume, for sure.
3. WTL - light-weight free GUI framework from Microsoft. But lacks documentation and not supported.
4. Some other less popular frameworks, including WxWidgets.
Be aware, that comparing to .NET IDEs, all these frameworks (except MFC) require some effort to install and to tune it for your needs (also, not an easy for a beginner C++ programmer).
 
Share this answer
 
v2
  • Get Code::Blocks with MinGW
  • Get ResEdit.


Inside Code::Blocks,

File->New->Project, Win32 GUI Project, Frame based. Give project a name.

Fit F9.


Or, there's always Visual Studio - which you've clearly got, since you're writing VB.NET code.
 
Share this answer
 
How about Visual Studio Express, free of charge? Please see:
http://en.wikipedia.org/wiki/Visual_Studio_Express[^],
http://www.microsoft.com/express/[^].

—SA
 
Share this answer
 
Comments
Himachandra 29-Jun-12 3:12am    
Helloww Mr..
I need help with directions....
I'm not asking you to write a book
I am asking that for doing this give me some direction.
Don't misunderstand . . . .
If you don't know abt cpp... sit calm
Sergey Alexandrovich Kryukov 29-Jun-12 3:27am    
OK. You are reported for your rudeness. I provided you proper information, thought you could use it. I don't think you understand what are you talking about. Directions... Directions on developing UI is a book. You did not even bother to explain what type of UI are you interested in: WPF? Forms? Silverlight? ASP.NET? Metro? GTK+? MFC? Something else?
--SA
enhzflep 29-Jun-12 9:26am    
Easy Tiger!
You have a highly detailed and enviable knowledge of many things related to programming. It is however the comments that you leave occasionally that leave me thinking: "страдающий манией величия" (megalomaniac for English speakers)

The original post is unedited, the tag clearly states C++. How the elephant is Silverlight or ASP.NET relevant?
Sergey Alexandrovich Kryukov 29-Jun-12 17:55pm    
Not at all. I don't have a single reason to have such kind of mania, just because there is nothing I could really be proud of. I just don't like rudeness. Anyway, thank you for your comments.

Now, to answer your question: the point is: Silverlight and ASP.NET are not much related, but they are different kinds of UI. As the question about UI programming is way too broad, perhaps pointing out just one application type first would make the question more realistic. Was there any other way to understand my note about different kinds of UI above?

Thank you.
--SA
Himachandra 29-Jun-12 3:40am    
I don't need suggestions from you......
use MFC..the sweetest of the development platform for windows environment..
 
Share this answer
 
Comments
Aescleal 30-Jun-12 9:01am    
Sorry old son, I can't share that opion. MFC might have been good 20 years ago but these days it's a complete behemoth that should have been put down.

If you'd like to revise your answer to something like: "Look at MFC, it can speed up the development process for windows apps and I really enjoy using it" then I'll crank up my 1 to a 4 or 5.
Albert Holguin 5-Jul-12 18:49pm    
That's more of an opinion on it.... some people hate Qt... [to clarify, not necessarily a bad opinion, but an opinion nonetheless]
stib_markc 6-Jul-12 6:50am    
I think MFC is easier to learn and excellent documentation is provided. I am a beginner, so to start off with MFC is good, but I am trying to shift to Qt, because I see Qt being advised by many, for GUI programming. But I find MFC comfortable, may be because I have been working from the past 1 year with it.
Albert Holguin 6-Jul-12 10:54am    
The documentation for MFC is really pretty darn good... Qt has the benefit of being cross platform but it's built differently than MFC so there will be a bit of a learning curve.
stib_markc 6-Jul-12 23:53pm    
Exactly, that is the reason, I am shifting to Qt, so that more opportunities will open up for me.
Use C++/CLI. It will be easy for you, coming from VB. I think any Visual Studio with VC include it.
From C++/CLI you can use native standard c++ too (but with some interop effort). Or fully switch to native c++ using one of the already mentioned lib.
 
Share this answer
 
C# is your best choice. .....
 
Share this answer
 

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