Trevor said:
Is it possible to write C++ GUI that is platform-independent? I just
started a class where the teacher's assignments are heavily entrenched in
the Windows API but I want to learn how to do such things with just the
language and nothing os-specific.
Not many languages build GUI directly into the language. It is usually
an API that surrounds the language. Tk is an add-on to the TCL
language, and Java's AWT is an API to the language... it is just
standardized. C++ does not have anything GUI based.
Take a look at wxWindows. It is a cross-platform graphics API, similar
to MFC. It works on a number of platforms, but it does not work on all.
It also has interfaces for Python and Perl.
Also, you might look into X Windows. Though it is not natively
supported on every system, just about every OS these days (Except for
MS) ships an X server with their OS (including Mac in 10.3, so I
understand). With this limitation, there are plenty of 3rd party X
servers for Windows, including the widely popular XFree86. I have yet
to run into a user-based OS that does not have a port of XFree86.
So in short, you have options that are much more cross-platform than
MFC, but no perfect solution. The only way there would be a perfect
solution, is if all OS vendors agreed to a standard, and that will
_never_ happen
Bravo on trying to think about cross-platform issues. It will make you
a better programmer... hands down.
Brian