windows GUI application 
July 18th, 2007, 12:25 AM
| | | windows GUI application
Hi,
How do you write a Windows GUI application in C++ ??
And is C++ the best language to write GUI applications in?
Thank you
Mohit | 
July 18th, 2007, 01:35 AM
| | | Re: windows GUI application
Mohitz <coolmohitz@gmail.comwrote in message... Quote:
Hi,
How do you write a Windows GUI application in C++ ??
>
And is C++ the best language to write GUI applications in?
Thank you
Mohit
| Lot easier to use an existing GUI library than write your own.
wxWidgets URL: http://www.wxwidgets.org
V IDE & V GUI: http://www.objectcentral.com/
FAQ http://www.parashift.com/c++-faq-lite
--
Bob R
POVrookie | 
July 18th, 2007, 06:15 AM
| | | Re: windows GUI application
Mohitz a écrit : Quote:
Hi,
>
How do you write a Windows GUI application in C++ ??
>
And is C++ the best language to write GUI applications in?
>
Thank you
Mohit
>
| No. Nowadays the best language to write GUIs is C# on Windows (assuming
MS windows) Try http://www.icsharpcode.net/OpenSource/SD/Default.aspx.
Java - which comes with swing - is another good option for making GUIs.
See http://www.netbeans.org and http://java.sun.com/docs/books/tutorial/uiswing/. It works not only on
Windows but also in Linux and others.
C++ is good but with Java and C# you get plenty of libraries included
"out of the box" while in C++ you usually need to find the libraries
yourself, including libraries to make your GUI.
J. | 
July 18th, 2007, 08:25 AM
| | | Re: windows GUI application
On 2007-07-18 02:23, Mohitz wrote: Quote:
Hi,
>
How do you write a Windows GUI application in C++ ??
| You get a GUI framework, read up on how to use it and start coding.
Different frameworks do similar things differently but the basics are
all the same. An easy starting point would be to download Visual C++
2005 Express from MS homepage. Other alternatives are QT and wxWidgets. Quote: |
And is C++ the best language to write GUI applications in?
| If C++ is the language you know best, then probably yes. But it depends
on a lot of things, like which framework you use and what kind of
application you intend to write and how good you are at using different
languages. If you intend to write an application which is very GUI-heavy
(much GUI code and litte non-GUI code) then C# might be a good alternative
--
Erik Wikström | 
July 18th, 2007, 01:15 PM
| | | Re: windows GUI application
"Mohitz" writes: Quote: |
How do you write a Windows GUI application in C++ ??
| You get a copy of _Programming Windows_ by Charles Petzold, and look for
tutorials to supplement that and get you started, on the net. GUI
programming involves, for most people, a new mindset. Quote: |
And is C++ the best language to write GUI applications in?
| Not unless you are already a pretty good C++ programmer, and I suspect that
if you were you wouldn't have asked the question. Visual Basic, C# and Java
come to mind. | 
July 19th, 2007, 02:35 PM
| | | Re: windows GUI application
On Jul 18, 8:14 am, jalina <jal...@nospam.please.comwrote: Quote: Quote: |
How do you write a Windows GUI application in C++ ??
| | Quote: Quote: |
And is C++ the best language to write GUI applications in?
| | Quote:
No. Nowadays the best language to write GUIs is C# on Windows (assuming
MS windows) Tryhttp://www.icsharpcode.net/OpenSource/SD/Default.aspx.
| Which is fine, but who uses Windows? (Or at least, who wants to
limit themselves to Windows.) Quote:
Java - which comes with swing - is another good option for
making GUIs.
Seehttp://www.netbeans.organdhttp://java.sun.com/docs/books/tutorial/uiswing/.
It works not only on Windows but also in Linux and others.
| Swing is very well designed, but Java isn't very good for
programming logic in general. Using Java for the GUI itself,
with Corba to communicate with the C++ part, is often a valid
option, however. Quote:
C++ is good but with Java and C# you get plenty of libraries
included "out of the box" while in C++ you usually need to
find the libraries yourself, including libraries to make your
GUI.
| There are a number of portable GUI libraries which work with
C++, wxWidgets seems quite widespread, for example. I don't
think that that's really a problem.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34 | 
July 19th, 2007, 02:35 PM
| | | Re: windows GUI application
On Jul 18, 10:16 am, Erik Wikström <Erik-wikst...@telia.comwrote: Quote: |
On 2007-07-18 02:23, Mohitz wrote:
| Quote: Quote: |
How do you write a Windows GUI application in C++ ??
| | Quote: |
You get a GUI framework, read up on how to use it and start coding.
| I'm just wondering: are there GUI libraries that can be used
other than as the application framework? Generally, when I want
a GUI, it's as some sort of plugin or dynamically loaded module;
having the GUI library take over main() just doesn't cut it.
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34 | 
July 19th, 2007, 02:55 PM
| | | Re: windows GUI application
BobR wrote: Here's my list:
# wxWigets (formerly wxWindows) -- the open source, cross-platform native UI
framework with eleven years of evolution behind it. http://www.wxwidgets.org/
# GTK+ http://www.gtk.org/
* GTK+ fundamentals, Part 1: Why use GTK+? (20 December 2005) http://www-128.ibm.com/developerwork...r-lnxw03WhyGTK
* GTK+ fundamentals, Part 2: How to use GTK+ (10 January 2006) http://www-128.ibm.com/developerwork...brary/os-gtk2/
* GTK+ fundamentals, Part3: How to deploy GTK+ (7 March 2006) http://www-128.ibm.com/developerwork...nxw03GTK+Tools
# gtkmm - the official C++ interface for the popular GUI library GTK+.
Highlights include typesafe callbacks, widgets extensible via inheritance and
a comprehensive set of widgets. You can create user interfaces either in code
or with the Glade designer, using libglademm. http://www.gtkmm.org/
# Qt - from TrollTech. http://www.trolltech.com/products/qt/index.html
# Ultimate++ - a C++ cross-platform rapid application development suite. It
includes a set of libraries (GUI, SQL, etc..), and an integrated development
environment. Rapid development is achieved by the smart and aggressive use of
C++ rather than through fancy code generators. In this respect, U++ competes
with popular scripting languages while preserving C/C++ runtime
characteristics. http://www.ultimatepp.org/
# Gideon Designer - an innovative GTK+ GUI building tool. Gideon is free
software distributed under the terms of GPL license. http://gideon.sourceforge.net/
# Other GUI Tool Kits http://www.atai.org/guitool/
--
Paul M. Dubuc | 
July 19th, 2007, 03:15 PM
| | | Re: windows GUI application
>I'm just wondering: are there GUI libraries that can be used Quote:
>other than as the application framework? Generally, when I want
>a GUI, it's as some sort of plugin or dynamically loaded module;
>having the GUI library take over main() just doesn't cut it.
|
Not sure what you mean. I think it has to do with the
event loop that is generally required.
We use Qt. It doesn't "take over"
main. I do have a main window that is created and shown in
main. Is this what you mean?
#include <QApplication>
#include "DBMain.h"
int main( int argc, char ** argv )
{
QApplication app( argc, argv);
DBMain mainform;
mainform.show();
app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
return app.exec();
}
Or are you referring to the instantiation of
QApplication? This is needed for the
event loop. Is this what you mean? | 
July 20th, 2007, 06:35 AM
| | | Re: windows GUI application
James Kanze a écrit : Quote:
On Jul 18, 8:14 am, jalina <jal...@nospam.please.comwrote:> Quote: Quote: |
>>How do you write a Windows GUI application in C++ ??
| | > Quote: Quote: |
>>And is C++ the best language to write GUI applications in?
| | > Quote:
>No. Nowadays the best language to write GUIs is C# on Windows (assuming
>MS windows) Tryhttp://www.icsharpcode.net/OpenSource/SD/Default.aspx.
| >
Which is fine, but who uses Windows? (Or at least, who wants to
limit themselves to Windows.)
> Quote:
>Java - which comes with swing - is another good option for
>making GUIs.
>Seehttp://www.netbeans.organdhttp://java.sun.com/docs/books/tutorial/uiswing/.
>It works not only on Windows but also in Linux and others.
| >
Swing is very well designed, but Java isn't very good for
programming logic in general. Using Java for the GUI itself,
with Corba to communicate with the C++ part, is often a valid
option, however.
> Quote:
>C++ is good but with Java and C# you get plenty of libraries
>included "out of the box" while in C++ you usually need to
>find the libraries yourself, including libraries to make your
>GUI.
| >
There are a number of portable GUI libraries which work with
C++, wxWidgets seems quite widespread, for example. I don't
think that that's really a problem.
| Yes sticking to GUI, this may be true. Nevertheless when you make a GUI
application, you often need a lot of other things. But the ones on C++
are either incomplete, either they offer poor support. If you want the
best you have to take from there and from there and from there....
I worked on a desktop application relating to finance in java: I had out
of the box large support for: strings and localization (Locale,
formatting including dates and currencies), dates (Calendar,
GregorianCalendar), plenty of GUI components, database access (JDBC).
I could also access internet (URL, Http API related, etc. and solution
for security issues included). Logging is so easy. When I left the
project, they were switching to java 6 and started using the light
database included in it.
I did not used that, but there is also API for image processing, many
many many APIs for processing XML in all forms and so on.
Of course all this using the free netbeans IDE which helps a lot in GUI
design, and MUCH MORE (see a guided tour of netbeans 5.5 or 6.0 and you
get the point - at least a very small point)
I wish wxWidget, which also have lot of libraries included - still i
doubt it has as much as Java - had a good IDE (as good as Netbeans)
Of course, all I said for java tends to be true for C# too (with Visual
Studio) but works only on Windows.
J. Quote:
>
--
James Kanze (GABI Software) email:james.kanze@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
>
| | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,840 network members.
|