Sign in to follow this  

WinApi MFC or ATL???

This topic is 4759 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello i want to write a new version of my BaseCode so i decided to wrap windows functions into a class. First i realized problems with the WNDPROC but i learned to solve this problem. But now i see, as i get further, that my CWindow class gets more and more like the one in MFC and ATL, that i start to program something like MFC or ATL. Now the questions: 1. Should i use MFC or ATL for OpenGL instead of the normal WinAPI??? 2. If yes, what are the disadvantages and what the advantages?? [Edited by - Songoku on November 30, 2004 11:47:04 AM]

Share this post


Link to post
Share on other sites
I can't speak for ATL, but using MFC has definite pros and cons:

Pros:
  • As you say, classes such as CWnd, that you would need to write from scratch, are already written and tested for you. This allows you to concentrate more time on your game, and less time on the architecture that runs it.

Cons:
  • You're tied, at least in part, to Win32. This won't be an issue unless you want to port to another platform.
  • You may have to include large parts of the MFC library to use classes like CWnd. MSDN says that the added overhead of MFC isn't particularly large, but it will increase the size of your executable, and may slow down your application a bit.
  • You can't optimize specific parts of MFC classes like you would be able to with your own.

In the end, it's entirely up to you. However, the vast majority of games use their own wrappers for Win32 and other operating systems, purely from a standpoint of speed and control. I think there are one or two games that use MFC, though (Max Payne, perhaps?).

Share this post


Link to post
Share on other sites
Quote:
Original post by Oluseyi
WTL is cleaner than MFC, and incorporates much (all?) of ATL. Last I checked, though, it was undocumented.
Are there no documentation sources for it at all?

Share this post


Link to post
Share on other sites
Quote:
Original post by microdot
Quote:
Original post by iNsAn1tY
Are there no documentation sources for it at all?

click me

Oh my God, pointed to Google like some common serf! How dare you, sir?!

Nice links there, though...

Share this post


Link to post
Share on other sites

This topic is 4759 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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