473,473 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

Jul 18 '07 #1
9 2780

Mohitz <co********@gmail.comwrote in message...
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
Jul 18 '07 #2
Mohitz a écrit :
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.
Jul 18 '07 #3
On 2007-07-18 02:23, Mohitz wrote:
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.
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
Jul 18 '07 #4
"Mohitz" writes:
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.
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.
Jul 18 '07 #5
On Jul 18, 8:14 am, jalina <jal...@nospam.please.comwrote:
Mohitz a écrit :
How do you write a Windows GUI application in C++ ??
And is C++ the best language to write GUI applications in?
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.)
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.
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:ja*********@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

Jul 19 '07 #6
On Jul 18, 10:16 am, Erik Wikström <Erik-wikst...@telia.comwrote:
On 2007-07-18 02:23, Mohitz wrote:
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.
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:ja*********@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

Jul 19 '07 #7
BobR wrote:
Mohitz <co********@gmail.comwrote in message...
>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
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
Jul 19 '07 #8
>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.

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?
Jul 19 '07 #9
James Kanze a écrit :
On Jul 18, 8:14 am, jalina <jal...@nospam.please.comwrote:
>Mohitz a écrit :
>>How do you write a Windows GUI application in C++ ??
>>And is C++ the best language to write GUI applications in?
>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.)
>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.
>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.
>
--
James Kanze (GABI Software) email:ja*********@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
Jul 20 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael | last post by:
Hi, I have a windows service developed using c# and it needs to lunch another windows application. I have been trying to use Process class to do it but the problem is becase windows service...
9
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am...
9
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
4
by: Kristof Despiere | last post by:
Suppose you have one domain, filled with a couple of users. What needs to be done now is I need to start a windows application from a webform by pressing a button on the webform (for example). ...
4
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
15
by: =?Utf-8?B?TVNU?= | last post by:
To demonstrate my problem, I have a very simple VB Windows application. It has a text box that is used to display a counter, a button to reset the counter, and a timer that increments the counter...
2
by: =?Utf-8?B?dmlzaHJ1dGg=?= | last post by:
Hi, I have 2 applications running, one Windows application project and the other windows services project. I want to call my Windows application in my windows services. I want to run them as...
1
by: =?Utf-8?B?dmlzaHJ1dGg=?= | last post by:
Hi, I have 2 applications running, one Windows application project and the other windows services project. I want to call my Windows application in my windows services. I want to run them as...
0
AmberJain
by: AmberJain | last post by:
Windows Autorun FAQs: List of autostart locations Linked from the Original article- "Windows Autorun FAQs: Description". Que: Can you list all the autostart locations for windows? Ans: Here is...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.