How to build GUI in c++?

clmlbx

Technomancer
Guys I have self learned c++.now I wish to make GUI for some programmes that I have written in it.. So guys pls tell me where to start... pls give step-by-step as I have no previous knowledge in it..

I learned c++ online and few good videos. I have never read any book. All tuts even books, at least what I have seen start and end in 'CLI' no one has topics for GUI..
 

nims11

BIOS Terminator
i use Qt for making GUI with C++. it is very powerful and well-documented. But you need to have your OOP concepts clear in order to get comfortable with Qt.
 

krishnandu.sarkar

Simply a DIGITian
Staff member
Yup..!! I've used Qt too..!! The best thing is it's Documentation.

But as already said by nims11, you need to have a good base on C++, which I didn't have.

So now as I know the basics already, I'm planning to learn C and C++ again now in advanced mode.
 

$$Lionking$$

In the zone
clmlbx - Win32 API... :) try D.J. Delorie (djgpp) or what I personally use -> Bloodshed(needs manual updation).

Also visit developer.amd.com -> try the nice profiler(AMD Code Analyst) from AMD. It will really help you optimize a lot.
 

sakumar79

Technomancer
VC++ is very easy to use and creating GUI using it is simple. It is available in Express Edition as free of cost. The only downside is that it will work only in Windows...

Arun
 
OP
clmlbx

clmlbx

Technomancer
Well it seems I have to try all three ..and I will then decide which suits/easy:grin: is for me..but no one gave me step by step guide to start.. pls tell me where to start.
 

krishnandu.sarkar

Simply a DIGITian
Staff member
Lionking and nims11 have suggested two diff. things.

May be that's why you are confused.

If you are looking for frameworks to develop GUI Apps, say like Visual Studio, you are probably looking for what nims11 have suggested, i.e. Qt.

And if you are looking for learning Graphics Programming (Core Level), like Drawing Windows, Buttons yourself by probing the Graphics Driver, then you are looking for what LionKing have suggested.

You can also use VC++ to develop GUI Apps like sakumar suggested, it's somewhat like developing GUI Apps using VB.NET / C# in Visual Studio. (May be, I'm not sure about this :p)

So, both are diff things, and you choose depending upon your requirement.

If you just want to simply develop GUI Apps without much headache then Qt / VC++ is the thing you are looking for.

Or if you are in to graphics programming then go for what Lionking has suggested, you can also do the same thing in VC++. I guess that's what we call VC++ Win32.
 
OP
clmlbx

clmlbx

Technomancer
well for now I should start with framework rather going for core level graphics programming.. so will start with VC++ as it must be having good support(many user will be using it).. so I will get good start.. later may also try at Qt as nims11 said it has good documentation..

Thanks guys.:)
 

$$Lionking$$

In the zone
Lionking and nims11 have suggested two diff. things.

May be that's why you are confused.

If you are looking for frameworks to develop GUI Apps, say like Visual Studio, you are probably looking for what nims11 have suggested, i.e. Qt.

And if you are looking for learning Graphics Programming (Core Level), like Drawing Windows, Buttons yourself by probing the Graphics Driver, then you are looking for what LionKing have suggested.

You can also use VC++ to develop GUI Apps like sakumar suggested, it's somewhat like developing GUI Apps using VB.NET / C# in Visual Studio. (May be, I'm not sure about this :p)

So, both are diff things, and you choose depending upon your requirement.

If you just want to simply develop GUI Apps without much headache then Qt / VC++ is the thing you are looking for.

Or if you are in to graphics programming then go for what Lionking has suggested, you can also do the same thing in VC++. I guess that's what we call VC++ Win32.

I havent used MS VC++ a lot but from what I understand, VC++ should be very different from .NET framework or any other language in the framework like VB.NET C#.NET haskell etc..
for 1 thing it is the only language available independent of the Visual Studio.

Developing apps in VC++ is nothing like developing apps in VB.NET or C#.NET.
VC++ is not a RAD language. u want to draw a window? u have to write code for it! While C#.NET & VB.NET are more like paint brush with dimension's.

Comparing TrollTech Qt to VC++ - not right bro.. both use different API's!

I did not suggest graphics programming at all??!?!?! Although with my approach you can go for DX10/DX11 programming too but that's a totally different thing, and beyond the scope of discussion for this forum....

yes I did suggest the Win32 API or Windows 32bit API.
On Windows API are Microsoft Foundation Classes(MFC) based using which you write your code in VC++.

@OP - Going for MFC without learning API is like trying to understand words when u dont know ABCD... Not possible. Even if you succeed to some level, you will have problem to debug.

You should go for Gtk or Win32 API. Also you should start by downloading DJ Delories or Bloodshed.... I did guide you from where to start... once you use them a lil bit ull know what ure dealing with.

But to be more honest with you, you will find it difficult be able to do Gtk or Win32 API.
So in the end you should go ahead with JAVA or VB.NET. (Sorry C# dont make no sense to me!!)

Enjoy! :p
 
Last edited by a moderator:
  • Like
Reactions: ico

krishnandu.sarkar

Simply a DIGITian
Staff member
@Lionking Yes you are right, that's my mistake.

VC++ is what I was referring to for writing code, and VB.NET / C#.NET is different thing.

Thanks for correcting me. :p

I forgot that I learned Win 32 API in VC++ back in college days, which we actually used to call Graphics Programming.
 

abhijangda

Padawan
There are many GUI toolkits for C++, the major ones are gtkmm, wxWidgets and Qt. Qt is the best one, I think, but others are very good too. But you should have a firm base of OOP in C++.
 

sakumar79

Technomancer
VC++ also now works with .NET Framework AFAIK - It is included in Visual Studio... And regarding help, there is a lot of online resourses for VC++ definitely.

Arun
 

krishnandu.sarkar

Simply a DIGITian
Staff member
Unless one doesn't wants to go in Core level Graphics Programming like in Games, it's not needed to go with Win32 API using C++.

Because everyone will try to avoid those hassles of drawing Windows and all.

If @OP is looking for GUI based App. Development, Qt is recommended.

@OP, I did a mistake while suggesting. I'm really sorry about that.

If you are looking for GUI App. Development without the headaches of Drawing Windows and all like in VB / VB.NET / C#, Qt is the thing you are looking for. Take a look at the link which @LFC_Fan posted above. Other than Qt there are Gtk, wxWidgets etc. But Qt is much better and recommended over others. Reasons already posted in the very beginning by nims11.

Otherwise you can go with Win32 API with VC++ if you like to draw everything on your own, it's core level graphics programming.
 

sakumar79

Technomancer
^^ I dont know where you got the idea that for VC++ you draw everything on your own... VC++ is just like VB in GUI - you can drag and drop labels, textboxes, etc into a form and arrange them, double click to open code writing, etc... Another advantage (I dont know about Qt, so I dont know if this feature is there or not), but there is on-the-fly error report for pointing out syntax errors, nondeclaration of variables, etc..

Arun
 

krishnandu.sarkar

Simply a DIGITian
Staff member
Well actually I learnt graphics programming in VC++ using Win32 API. I don't know whether it's possible to do it same like in VB.

Sorry for the mistake.

Sent from my LG-P500 using Tapatalk
 
OP
clmlbx

clmlbx

Technomancer
@ Liverpool_fan thank you for that QT tutorial ..

thank you guys foll all your input.. I know now their are two ways of creating GUI either by core level graphics programming or by forms.. I will choose forms for now as I am not at all interested in going for core level graphics programming.. I want easy and quick way to create GUI and apparently forms is the quickest way to do it..

Programming is not at all related to my field or work (Graphics Designing). It is just I love writing codes,I love using logic and it's just my hobby.. So forms it is but I will try QT soon and hope that is as easy as it sounds.. I got my self fully loaded with visual c++ express edition and Book (Ivor Horton's Beginning Visual C++ 2010).. but It is going to be very slow process as I can get to it in only once a week or so. Hopefully will start in few Days..
 

abhijangda

Padawan
ZetCode, tutorials for programmers has one tutorial for beginners.

Also, I would recommend following books
C++ GUI Programming with Qt
The art of building Qt applications

Although, I haven't read anyone, but on googling I found good reviews. Also, I have been doing gtkmm and it is simple as compared to Qt. At first stage I would recommend gtkmm and then go for Qt. Actually, Qt came at the time when standard ANSI/ISO C++ was not defined, hence Qt has so many of its own features which C++ has after its standardization. That's why, you will use qmake to compile and create projects and makefiles. While gtkmm and wxWidgets use compilers like g++.
If you start with gtkmm then there is a very good book available
Programming with gtkmm 2 and Programming with gtkmm 3.

Good Luck!!
 

$$Lionking$$

In the zone
^^ I dont know where you got the idea that for VC++ you draw everything on your own... VC++ is just like VB in GUI - you can drag and drop labels, textboxes, etc into a form and arrange them, double click to open code writing, etc... Another advantage (I dont know about Qt, so I dont know if this feature is there or not), but there is on-the-fly error report for pointing out syntax errors, nondeclaration of variables, etc..

Arun

not right bro!!!
 

Liverpool_fan

Sami Hyypiä, LFC legend
The thread has run its course. The OP can create a thread on help on the specific GUI toolkit if s/he desires.

EDIT: Thread reopened as per request. Please keep the discussion healthy and check the accuracy of your posts before posting. Thanks.
 
Top Bottom