I am not yet onto the actual OO things yet, but I understand
loops.
You also need to understand the environment in which your programs are
going to be executed. The C++ programming language comes with a
standard library of functions: the I/O streams library, the standard
template library STL, the standard C library, to name some. These
allow you to create programs i.e. for console output without deep
knowledge of your operating system. However, if you are going to write
applications that proffer a GUI with buttons, menus, and so on, the C+
+ keywords and standard functions are not enough. The same applies to
programs that, like your task of choice, interoperates with system
specifics.
Right now, I want to make a program that changes the desktop
background at certain intervals.
If you want to stick with C++ on Windows, you should download a copy
of Microsoft's Visual C++ Express edition. This is not intended to
start a "My IDE is better than yours" flame war, but I feel for a
beginning programmer on Windows this free of charge IDE gives some
head start. Get a good book on Windows programming, read about the
Windows SDK in general, maybe have a look at concepts like "callback
functions", "event loops" and the design patterns "Model-View-
Controller" and "Inversion of Control". This will help you to
understand how GUIs and GUI elements interact with your business
logic. Start with a small GUI application, not with drilling deep into
the inner workings of the Windows Shell. You selected task would
require you to programmatically manipulate the Windows internal
database "Registry". This is a very sensitive spot of the Windows OS -
not a beginner's topic. Screwing up here it's easy to shoot down a
system to the point of not booting anymore, having to install the
whole computer from scratch.
Be aware, most of the stuff is OS specific - Unix applications use
similar general concepts but are very different in implementation
details.
You can find plenty of example code, ten thousands of related articles
at
http://www.codeguru.com,
http://www.sourceforge.net,
http://www.codeproject.com,
and many more similar sites. Its probably not helpful to give source
code for a Windows C++ GUI project here - usually a lot of code
generated by the IDE is involved; you do not need to read or
understand it to create GUI programs as long as you understand the
concepts behind it. The "OO things" are a vital part of concurrent
Windows programming, so you should try to understand the concept of
classes, objects and inheritance in order to make sense of it.
Well, I started learning about computers because I wanted to
understand all these error messages I get. Then I got into programming
C++ because I heard it translates very well into PHP, and a site I
used to admin uses PHP as its server language.
PHP and C++ share some syntactic similarities - but that's about it.
best,
MiB.