Sign in to follow this  
Brauss

Creating An Application In C++

Recommended Posts

Brauss    100
I feel quite lost. I have been reading 'C++ A Beginner's Guide' by Herbert Schildt. I am quite close to the end of the book, but the author has already said that he does not cover creating applications in the rest of the book. Of course I am still going to read the rest of it as I am eager to learn it all, but I would like to know how to create an application with C++. Currently I can create console applications, but this has limited appeal. How do I make an actual program with buttons and a window of it's own and all those nice things? Is there a guide out there anywhere? I don't want to skip details out, so I want a good knowledge of everything necessary to do for creating an application. Links would be helpful! Thank you for your time

Share this post


Link to post
Share on other sites
SiS-Shadowman    359
This is usually a OS specific question. With windows you can use the CreateWindow function, but that's pretty low level. I would advise to use Qt to learn GUI applications because it's very easy and even portable (Windows, Linux, Mac(?)).
Check out www.trolltech.com.

Another approach would be the MFC, although that one is outdated and ugly as the windows API.
There are even more alternatives, like wxWidgets, but I haven't used it yet, so another member has to comment on that.

I hope it helps you (Qt rocks the big one :) ).

Share this post


Link to post
Share on other sites
ChaosEngine    5185
Bear in mind that most people these days feel that there are better solutions than C++ for application development (.Net or Python for example)

As shadowman said there are several libraries available in c++ including MFC, qt and wx. Personally I wouldn't go near win32

Share this post


Link to post
Share on other sites
Zahlman    1682
Quote:
Original post by Brauss
I feel quite lost. I have been reading 'C++ A Beginner's Guide' by Herbert Schildt.


That is no surprise. By all accounts, you have chosen about the worst book imaginable. :)

Quote:
Currently I can create console applications, but this has limited appeal.


They are, however, real applications. Creating applications with a GUI is the same, in that you compile them. However, you will need to use some kind of API to do the GUI work with. Exactly how this works depends on what you want the GUI to look like, what platform you're developing for, and what your exact requirements are.

Share this post


Link to post
Share on other sites
Brauss    100
So, to create applications you need to download additional software which helps you make them?

How exactly does this work?

How do I know the best software to get?

What I want to do is create games...obviously. For windows.

Share this post


Link to post
Share on other sites
ThrustGoblin    180
Learning Win32 is not such a bad idea, if you're making games for windows. In general, you'd better aim to know as much as you can about the layers below you -- including APIs, OS, and hardware. However, you don't need to know everything about Win32 in order to make a simple windows app -- or even a full game engine. Just enough to get by ;)

I googled this tutorial:

http://www.winprog.org/tutorial/start.html

Share this post


Link to post
Share on other sites
SiS-Shadowman    359
However I would not choose WIN32 as a beginner.
Those are some options:
-Qt 4.5
-wxWidgets

Don't EVER use MFC and don't even start with win32 if you're not even familiar with GUI programming.
Personally I would choose Qt because of it's great documentation and simplicity. But I guess that wxWidgets would be great as well. However a GUI and a non-GUI application are both applications, it doesn't matter if they have buttons or not.

When you're familiar with GUIs in general and have created some programms (a calculator for example), then you can dig deeper and try out win32 to create a window.

Share this post


Link to post
Share on other sites
Perost    332
Quote:
Original post by Brauss
So, to create applications you need to download additional software which helps you make them?

How exactly does this work?

How do I know the best software to get?

What I want to do is create games...obviously. For windows.

If all you want to do is create games you don't need to know about Win32, which is more used to create windows applications. A better choise would be a library that focuses on graphics and other things important for games, such as SDL. Lazy Foo has an excellent tutorial on SDL here. Check out the first lesson, which shows you how to set up SDL on most popular compilers.

With SDL you can focus on creating a game instead of on how to create a window. It also works on Linux, Mac OS and other platforms, so your not bound to only Windows.

Share this post


Link to post
Share on other sites
Brauss    100
Thanks for all your help everybody

I bought the 'Game Coding Complete 3rd Edition' recently (should arrive in a week or so), and I think this uses DirectX.

Isn't directx the best or most popular SDK for game programming? The reason I am asking for help here is that I can only create console applications at the moment and was wondering if I needed any extra knowledge to use directx.

I am rather confused. What is an SDK, exactly?

Share this post


Link to post
Share on other sites
Beyond_Repair    116
Win32 is Microsoft+Windows specific and fairly outdated (and C-style API). GUI development IMO benefits from object orientation.

C++ is good for graphics intensive games performance wise. If you want to program GUIs for games with C++, download something platform independent suggested above, or write a GUI yourself (still requires a graphics output API like SDL/OpenGL/DirectX though).

For general applications, unless there are heavy performance requirements I'd simply choose an easier language (Java and C# are quite similar to C++).

Edit:
SDK = Software Development Kit
API = Application Programming Interface

DirectX is a good choice for making Windows games, yes, but be aware it's also pretty low level. You'll probably want to download a GUI package to work on top of DirectX (or again, write one yourself, which takes time but can be a good learning experience).

Share this post


Link to post
Share on other sites
Beyond_Repair    116
Just to clear this out, we're listing three different levels of choices:

Choosing a language - but it seems that's done. :)
Choosing a graphics API (depends on language) - seems that's done too (DirectX).
Choosing a GUI API (depends on graphics API and language) - undecided.

Share this post


Link to post
Share on other sites
Brauss    100
You are all so helpful. Thank you very much!

So, I download the graphics API, which helps me create graphics? and then I download the GUI API, which does what?

Also, would my Game Coding Complete book be a good way to learn to create games using the graphics API - but would it not include advice on how to use the GUI API? What would be the best way to learn these things?

=S

Again thank you so far

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this