Author Topic: C++ Question  (Read 4730 times)

fuchisasquatch

  • *
  • Posts: 111
    • View Profile
    • http://aa.1asphost.com/sasquatch/
C++ Question
« on: 2004-08-21 05:47:32 »
Ok, im learning c++ and have completed console crap tutorials (again) cuz i forgot some stuff. So what should i learn next Win32 or MFC?

Micky

  • *
  • Posts: 300
    • View Profile
C++ Question
« Reply #1 on: 2004-08-21 08:07:36 »
You could learn MFC first. That is a C++ wrapper around the Win32 API, so concepts you learn there apply to a certain extend to both MFC and Win32. I didn't "learn" Win32 at all, I just looked up the documentation for something I needed when necessary.
What about looking at SDL or glut, to get something onto the screen without worrying too much about operating-system internals?

fuchisasquatch

  • *
  • Posts: 111
    • View Profile
    • http://aa.1asphost.com/sasquatch/
C++ Question
« Reply #2 on: 2004-08-21 08:13:42 »
Oh thanks ill take a look at them.

halkun

  • Global moderator
  • *
  • Posts: 2097
  • NicoNico :)
    • View Profile
    • Q-Gears Homepage
C++ Question
« Reply #3 on: 2004-08-21 13:08:45 »
GLUT isn't reall supposed to be a full interface for OpenGL, so I've heard. It might be better to go with AllegroGL. (Learn Allegro first)

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
C++ Question
« Reply #4 on: 2004-08-21 13:57:42 »
Win32api are windows-system functions, like getting system colours, screen resolutions and such;
MFC are all the seeable windows things like dialogs, buttons, lists, (also windows types, like arrays and such)

So don't learn them, but try to use them ! When you will be programming some proggy with user interface you will learn it all.

and OpenGl is quite easy to use ;)

Micky

  • *
  • Posts: 300
    • View Profile
C++ Question
« Reply #5 on: 2004-08-21 17:33:33 »
Quote from: halkun
GLUT isn't reall supposed to be a full interface for OpenGL, so I've heard. It might be better to go with AllegroGL. (Learn Allegro first)

True, but only half...
Glut isn't meant for full applications, but for test and example code or for learning OpenGL. Because OpenGL is hardware independent all the code necessary to create a window is up to the operating system. X-window has the glx* calls, windows has wgl* and osx has agl* for that. So glut provides a minimal platform-independant API to open a window, install event handlers and some minimum gui stuff for things like pop-up windows.
But once you've got a OpenGL context you can access the full interface for OpenGL, it's just maybe not all GUI features you may want.
SDL is even simpler: All it does is create the window for you, you have to make all the GUI yourself. Some games, especially commercial Linux ports of Windows games seem to prefer that.
I only looked at allegro years ago on MS-DOS, but it seemed to go into a similar direction as SDL.
Quote from: mirex
Win32api are windows-system functions, like getting system colours, screen resolutions and such;
MFC are all the seeable windows things like dialogs, buttons, lists, (also windows types, like arrays and such)

Almost right as well...
You can do everything MFC does in Win32. If you have MSDN installed have a look for functions like "CreateWindow" or "WndProc", they are Win32api functions. MFC builds a lot of functionality on top, like you don't have to write your own message dispatcher but you can overload message handlers. Additionally it provides a windows-equivalent of STL. I did a full windowed application in pure C and win32 code in visual c++, because I thought MFC was crap. I'll probably have to check it again some time, as I've got more experience with C++ now.
On the other hand, Microsoft is pushing C# and the .NET framework at the moment, so the whole win32/MFC stuff may be replaced by new libraries in the future.

Oh, and I suggested SDL because additionally to an OpenGL context it provides a simple framebuffer interface. That would give a beginner the chance to learn all the basics, like setting single pixels, drawing lines and circles with bresenham's algorithms, blitting sprites, viewing pictures... That may give more reward initially, because you don't have to worry about view transforms and texture setups...
Allegro may be a similar option, but I don't know much about it.

Qatev

  • Guest
C++ Question
« Reply #6 on: 2005-05-11 01:28:01 »
Dude! Any decent programmer would learn MFC next.

--Qatev

sfx1999

  • *
  • Posts: 1142
    • View Profile
C++ Question
« Reply #7 on: 2005-05-11 04:10:07 »
OK, listen, this topic is very OLD, and the user who started this topic has been banned.