GUI`s with C++


I will write a small Programm with a simple GUI only with some buttons, textfields and labels. I have only written programms for the commandline. Has anyone a small tuturial or some examples or something else? It would be nice, when I can use the GUI under Linux and Windows. I use Dev-cpp....



Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Which platform ?
mystixsAuthor Commented:
I use windows......

It would be nice, when it runs under linux and windows? But when it runs only with windows it would be also okay....

Because you have to use the windows API to create a GUI, I don't believe it is possible to create a GUI that will run under both windows and linux. Maybe there is some 3rd party lib out there that can give you this functionality but I don't know about any.

For windows though, which compiler are you using. There may be a wizard that can create a sample application for you. For example:

Using MS VC++ 6.0,  you can create a new MFC AppWizard (.exe) project. You can then select to have some basic windows and functionality put in there. Sounds to me as if you are after a dialog based application. The wizard will create all the basic for you and then you can look at the source to get an idea of what needs to happen.

GUI programming is quite involved and thus it is not really worthwhile trying to create a simple example for you. It will ofcourse depend greatly on which compiler you are using (unless you want to use the WIn32 API directly)

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Check ou this tutorial :

It uses the Windows API to create GUI's for your C++ application.

It won't be portable to Linux though !! I'm not aware of a good library that provides Linux-Windows portable code for GUI's.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Download Qt library that runs on both windows and linux.
And just fyi : this link is among others linked to from the Dev-C++ site :
It is also available as open source for windows.
For linux its free
To use Qt freely you also need mingw. Download that also
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.