WinApi MFC or ATL???

Started by
6 comments, last by iNsAn1tY 19 years, 4 months ago
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]
Advertisement
Is there realy nobody who can help me???
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?).
My opinion is a recombination and regurgitation of the opinions of those around me. I bring nothing new to the table, and as such, can be safely ignored.[ Useful things - Firefox | GLee | Boost | DevIL ]
WTL is cleaner than MFC, and incorporates much (all?) of ATL. Last I checked, though, it was undocumented.
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?
My opinion is a recombination and regurgitation of the opinions of those around me. I bring nothing new to the table, and as such, can be safely ignored.[ Useful things - Firefox | GLee | Boost | DevIL ]
Quote:Original post by iNsAn1tY
Are there no documentation sources for it at all?


click me
<span class="smallfont">That is not dead which can eternal lieAnd with strange aeons even death may die.   -- "The Nameless City" - H. P. Lovecraft</span>
Try wxWidgets, formerly wxWindows. You can still get access to the HWND even though it's a cross-platform library.
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...
My opinion is a recombination and regurgitation of the opinions of those around me. I bring nothing new to the table, and as such, can be safely ignored.[ Useful things - Firefox | GLee | Boost | DevIL ]

This topic is closed to new replies.

Advertisement