Does MFC cut it?

Started by
29 comments, last by antareus 20 years, 11 months ago
quote:Originally posted by SabreMan, in another thread One question: why are you doing this when you could be using an existing GUI toolkit that already solves the problems you''re encountering?
That question made me think: does MFC cut it for app development? Or does everyone use homebrewed classes for common tasks? I noticed that while MFC has just about EVERYTHING in there practically it seems like you still have to make API calls (for things like Timers) and many things (such as asynchronous sockets) are sub-par. Particularly, I object to the abuse of inheritance that CAsyncSocket employs, which forces client classes to derive from CAsyncSocket itself. Client classes are not a type of CAsyncSocket. They should have used callbacks. The nonblocking sockets in MFC, according to the Winsock Programmers Guide (URL I''ll come back with later), for some strange reason, spawn a worker thread and wait inside it (they derive from CAsyncSocket even) when the blocking calls would more than suffice. My guess is they didn''t want newbies hanging the GUI thread with blocking calls. To their credit, they do use RAII effectively, and the message map tables are cute but WTL/windowsx.h does them the same way as well and has no runtime requirement. The runtime is also ubiquitous, and most C++ Win32 apps are programmed in MFC. Is that good enough for you to use it? For me, it isn''t. What are your thoughts?
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
Advertisement
Consider your alternatives. Raw Win32?
quote:Original post by Zipster
Consider your alternatives. Raw Win32?

Or... the VCL, perhaps?
I'll take raw Win32 instead. It is gross, but Win32 really does want to to be objectified.

VCL...is that Borland's suite?

Lack of great alternatives doesn't make the mediocre ones better in my eyes, especially in the face of .Net's solid libraries.

[edited by - antareus on June 5, 2003 6:22:19 PM]
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
What are you guys afraid of?
I use raw win32 all the time, and in time I developed
my own classes, to handle window events, manage
dialog creatures, like textboxes, comboboxes, etc...

I allways wondered what MFC offered that made everyone
flock to it. I see it as a "VB" approach, but used by
those that already know C... VB aproach in the sense
that it shells you from having to deal with the raw win32
things...

Well, maybe you guys are in a Fast-Devlopment environment,
where everything is pretty much needed for yesterday, and
it forces you into a position where you have to adopt
something similar to MFC, or MFC itself...

Or maybe this is just my twisted vision of what a game
needs and uses in term of windows resources, and maybe other
applications are much more deep...

my thoughts ($0.02)

[Hugo Ferreira][Positronic Dreams]
I Am Digerati.

I know that you code in C++ but now all my app development that I have to do to be able to convert things or analyse some data from my game, or make this map editor, I use C# and the .NET framework. I have found it, to be a really enjoyable experience as you get results fast and the application don''t seem slow at all. The .NET framework makes it extremely easy to make any type of application I had to make so far and linking libraries built in C++ and tying them up with my program (A Scene Editor for example for my game, so the tying up the graphics engine) was a breeze. Maybe if you can, you should check the .NET framework as you can also make C++ programs with it. After all MFC is windows specific so it is not like you are loosing any compatibility.

Good Luck.
I would be using .NET except for one cosmetic flaw with it.

It appears to be horrible with managing memory, when in reality the task manager misrepresents memory usage by the program. It also isn''t as slim as C++ is.

Anyway I''d be using it except my users wouldn''t adopt things I write because of this flaw.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis
One word, WTL; well three really, Windows Template Library.


Dave "Dak Lozar" Loeser
Dave Dak Lozar Loeser
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous
WTL is awesome.
daerid@gmail.com
Here''s my bit...

Started with raw Win32...waste of time really, sorta like reinventing the wheel...

MFC...typical M$ hack, didn''t like it
OWL...Copy of MFC and even worse!
VCL...What I use now.

A friend put me onto VCL at work (all we had there was VC++) and now I have to admit that it is far from mediocre and lets you get down to the actual coding of the app specifics rather than playing with the M$ debacle.

The only problem with VCL is Borlands compiler is slow compared to VC++ but when the actual coding takes less than 1/4 the time it would under VC++ with MFC who cares.

This topic is closed to new replies.

Advertisement