• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

GUI`s with C++

Hello!


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....


Thanks!!!

mystixs

0
mystixs
Asked:
mystixs
1 Solution
 
rajeev_devinCommented:
Which platform ?
0
 
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....



0
 
gerhardschoemanCommented:
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)


regards
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Infinity08Commented:
Check ou this tutorial :

http://www.winprog.org/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.
0
 
rajeev_devinCommented:
Download Qt library that runs on both windows and linux.
0
 
Infinity08Commented:
And just fyi : this link is among others linked to from the Dev-C++ site :

http://bloodshed.net/dev/doc/index.html
0
 
rajeev_devinCommented:
It is also available as open source for windows.
http://www.trolltech.com/download/qt/windows.html
For linux its free
0
 
rajeev_devinCommented:
To use Qt freely you also need mingw. Download that also
http://sourceforge.net/projects/mingw/
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now