2

Hi i am developing game level editor.Currently I am using win32 with directX.But with win32 I cant achieve fully object oriented implementation.So I am thinking to develop it in MFC. Will it be better option than win32? Which technology(MFC/Win32) is widely used in industry? Also which technology is most suitable for my project?

6 Answers 6

7

MFC is quite widely used, but it's an archaic framework that is nowhere close to Codegear VCL, wxWidgets or TrollTech QT in terms of sophistication.

I would never recommend MFC to anyone... If you do not wish to use anything else, WTL is a nice light wrapper around the Win32 API thats much better.

0
5

MFC is a dated technology that I believe is not being actively developed by Microsoft anymore. I would recommend staying away from that framework on any new project.

3
  • 4
    I very much doubt that MS does not support MFC anymore, in fact there is a very recent article explaing how to use the "Restart Manager" functionality via MFC in VS 2010. So its far from dead, but it's never been the best for anything. The last big and well written MFC application I remember was Visual Studio 6 itself
    – rep_movsd
    Mar 21, 2010 at 17:36
  • It's being actively developed, and recently had the ribbon UI added.
    – fabspro
    Jan 18, 2012 at 13:57
  • Interesting... do you have a reference? Jan 18, 2012 at 17:18
3

I'm a bit surprised by the amount of dislike towards MFC - yes, it is a bit clunky and it is an "old-style" framework, however it is still supported and expanded by Microsoft (for example in Visual Studio 2008 SP1 MFC was the first of all Microsoft toolkits that got Office 2007-like ribbon).

3
  • Agreed, I don't think those posters have looked at it lately. It however doesn't do anything to make DirectX programming any easier beyond providing a HWND. None of the GUI class libraries do. Mar 21, 2010 at 17:35
  • Because MFC is fragile and monolithic? It's just not designed well. If your project doesn't fit into the (MDI Document Editor) mold, then 99% of MFC is useless but you have to drag it along because it's coupled into the 1% you need. You can ADD to what MFC provides, but trying to change any of the MS-blessed functionality is an exercise in frustration.
    – Ben Voigt
    Mar 22, 2010 at 5:09
  • This is too dramatic - MFC also has many wrappers around Windows APIs that can be used separately from the Document/View bits. And if you don't want to link to a huge library, use static linking. Mar 22, 2010 at 16:39
2

I'd probably go with MFC. Although MFC itself does nothing to support DirectX graphics, a few people have written various classes to create an MFC view that uses DirectX for the display. While none of these is particularly new, little seems to have changed -- I haven't tested all of them, but (for example) the first link (to CodeProject) built fine in 32-bits with VS 2008, and needed only one trivial change to work as 64-bit code as well (change GetClassLong to GetClassLongPtr, and GCL_CURSOR to GCLP_CURSOR).

Another possibility would be to consider something like Ogre3D, which at least one person has successfully integrated with MFC.

1

MFC sounds sensible to me, it's a wrapper around the WIN32 API to provide a more object oriented interface, so sounds like what you need. There are of course other alternative frameworks that people have mentioned, but to be honest I'd go with whichever one you are familar with, I doubt that an editor has highly sophisticated UI requirements anyway other than providing menus, buttons and dialog boxes / property editors.

As an alternative have you considered C#? That seems quite a common way to write game level editors these days, and you can still call your C++ game core from it.

1

Win32 does nothing to stop you from being object-oriented. No matter which object oriented framework you choose, it will eventually call the standard Win32 API. At any rate, MFC fits well for game editors because of the MVC design.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.