By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,346 Members | 2,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,346 IT Pros & Developers. It's quick & easy.

How can I create simple applications for Windows?

P: n/a
I have bought a book to learn C++, I bought Jesse Liberty's thick book,
and so far I haven't seen how I can create simple applications for Windows
with buttons, checkboxes, text areas, etc... Everything happens in the
terminal so far. How can I create for instance a real application like the
Windows calculator that you get when you type "calc" in the Run command?
I'm missing something obvious.
Do you have links that could help me doing it, with examples, etc...?
Thanks,

--
Justin.
http://ww.opera.com/m2/
Jul 23 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
ben
Download the Windows Platform SDK and have a look at the samples.

ben
Jul 23 '05 #2

P: n/a
I'll be kind since you are obviously new to programming :-)

There is no "easy" way to create a windows application with buttons,
etc. If you don't know C++ then stick with the terminal for now and
learn the language. Once you know C++ then you can get into the
Windows API.

Have you done any other languages? If not don't expect to be writting
'calc' anytime soon. If you are familiar with VB and you are wanting
something like that you are sorely out of luck. There is no (not
really) any click and drag for making a windows app. Once you know C++
and understand classes, inheritance, polymorphism, etc then go grab the
windows programming book by Petzold and dive in.

Hang in there, its a rough road but worth sticking it out.

Jul 23 '05 #3

P: n/a

"Justin Sane" <me@privacy.net> wrote in message
news:op.srvhjgt1gl9owm@sony...
I have bought a book to learn C++, I bought Jesse Liberty's thick book,
and so far I haven't seen how I can create simple applications for Windows
with buttons, checkboxes, text areas, etc... Everything happens in the
terminal so far. How can I create for instance a real application like the
Windows calculator that you get when you type "calc" in the Run command?
I'm missing something obvious.
Do you have links that could help me doing it, with examples, etc...?
Thanks,

--
Justin.
http://ww.opera.com/m2/


C++ is not about graphical interfaces. If it was, it would have disappeared
long ago. Those proprietary graphics are platform specific and therefore
collide with C++'s long-standing idealogy that its code should compile
regardless of the platform involved. Beats leaning a specific platform and
by the time you're done, its already being phased out.

This does not prevent you from implementing a proprietary interface and
still have a C++ backbone to process with. Drawing a button on a window
frame is a simple matter. Its just a question of using the tools offered by
the platform or library (some of which are partly portable). With Windows,
you might consider WTL, SmartWin, Qt, wxWindows amongst many, many others.
I'ld even suggest giving them all a try as well as other languages that do
support a GUI (like Java).

Jul 23 '05 #4

P: n/a
Me
This is way off topic for this newsgroup but most people start out
programming Windows (including me) by reading
http://www.charlespetzold.com/pw5/ but I think that book is complete
garbage. If you want to program Windows in C++, I highly suggest
http://www.dilascia.com/wpp.htm even though large sections of that book
are outdated (it's a Windows 3.1 book). It's still the best book IMHO
for learning Windows programming with C++. Consider learning the
outdated parts as trivia as to why the Windows API was designed the way
it was and any other weird quirks of having a 16-bit non-preemptive,
non-protected mode architecture.

Jul 23 '05 #5

P: n/a
> I'ld even suggest giving them all a try

Thank you Peter, I'll take a look at them. I'm learning C++ as a hobby,
because I use only web programming languages so far. But it's going to be
interesting, even if so far it's pretty tough!

--
Justin.
http://ww.opera.com/m2/
Jul 23 '05 #6

P: n/a
Justin Sane wrote:
I'ld even suggest giving them all a try

Thank you Peter, I'll take a look at them. I'm learning C++ as a hobby,
because I use only web programming languages so far. But it's going to
be interesting, even if so far it's pretty tough!


Learning to program GUIs in C++ is almost as much work as learning C++.
It is a whole new layer on top of C++.

After you understand C++ (definitely not before) then the quickest route
to writing Windows GUIs in C++ is to use the MFC library (comes with
Visual C++), and the MFC book by Jeffrey Prosise.

On the other hand, if all you really want is to write Windows GUIs then
Visual Basic will get you going much faster and easier than learning C++
and a windowing library. VB GUIs leave much to be desired, but the
whole idea behind VB is to make it as easy as possible to make a GUI.

--
Scott McPhillips [VC++ MVP]

Jul 23 '05 #7

P: n/a
On Sun, 05 Jun 2005 14:26:42 -0500, "Scott McPhillips [MVP]"
<org-dot-mvps-at-scottmcp> wrote:
Justin Sane wrote:
I'ld even suggest giving them all a try

Thank you Peter, I'll take a look at them. I'm learning C++ as a hobby,
because I use only web programming languages so far. But it's going to
be interesting, even if so far it's pretty tough!


Learning to program GUIs in C++ is almost as much work as learning C++.
It is a whole new layer on top of C++.

After you understand C++ (definitely not before) then the quickest route
to writing Windows GUIs in C++ is to use the MFC library (comes with
Visual C++), and the MFC book by Jeffrey Prosise.

On the other hand, if all you really want is to write Windows GUIs then
Visual Basic will get you going much faster and easier than learning C++
and a windowing library. VB GUIs leave much to be desired, but the
whole idea behind VB is to make it as easy as possible to make a GUI.


If Justin is learning C++, then Visual C# might be a better bet for
Windows GUI development. I use C++ for console applications and C#
for Windows GUI applications. Horses for courses.

rossum

The ultimate truth is that there is no ultimate truth
Jul 23 '05 #8

P: n/a

"Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp> wrote in message
news:CL********************@comcast.com...
Justin Sane wrote:
I'ld even suggest giving them all a try

Thank you Peter, I'll take a look at them. I'm learning C++ as a hobby,
because I use only web programming languages so far. But it's going to
be interesting, even if so far it's pretty tough!


Learning to program GUIs in C++ is almost as much work as learning C++.
It is a whole new layer on top of C++.

After you understand C++ (definitely not before) then the quickest route
to writing Windows GUIs in C++ is to use the MFC library (comes with
Visual C++), and the MFC book by Jeffrey Prosise.

On the other hand, if all you really want is to write Windows GUIs then
Visual Basic will get you going much faster and easier than learning C++
and a windowing library. VB GUIs leave much to be desired, but the
whole idea behind VB is to make it as easy as possible to make a GUI.

--
Scott McPhillips [VC++ MVP]


Don't take this personally, but MFC and VB are two bad choices for a host of
reasons. WTL is a much better choice than MFC, as an example. Lets get this
clear: MFC is not C++ in any way. Neither is it even capable of emulating
it.

Those that state that programming *with* GUIs is difficult have forgotten
what C++ is all about.

Programming with a GUI is reusing existing libraries (many of which are
proprietary and unaccessible). C++ is about ground-up creation, inheritence,
design patterns, containers, iteration, templates to name a few. Its not
about using someone else's hidden code to draw a rectangle on the screen for
one specific platform.

Wait till the next version of Visual comes around. MS has finally chosen to
integrate the STL and modern C++ with it. Some people are in for a shocker
when they'll realize how deep, powerful and involved that C++ standard is.

Jul 23 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.