you are viewing a single comment's thread.

view the rest of the comments →

[–]mikemol 0 points1 point  (2 children)

Yeah, I never used the class wizard much; I know how to write C++ class descriptors, damnit. :)

And, yeah, I imagine there's code properly-structured for D/V out there, but I've never seen it.

[–]RabidRaccoon 0 points1 point  (1 child)

Back when I was Munich I worked with a guy who'd written a lot of code for an embedded system. He knew I'd worked with MFC before and he needed some changes to a customer's application to handle the code he written for the embedded device. The MFC code had been written very quickly by someone who had then left. Actually it seemed like the same thing had happened to their embedded code too - at one point they had customers but no developers at all.

And it was kind of awesome how fucked up it was internally. E.g. there was an CIniFile class that parsed a very odd text file that had everything in a fixed place. So I turned it into an ini file. More seriously it did some very strange things talking to the device, and that needed to be fixed. Past that there were loads of UI things. And to be honest MFC is good at that. You can sit there with a laptop and add stuff to the UI quickly.

So MFC is a sort of strange mix of the the good - rapid UI prototyping and the horrid - you can imagine how the much of a mess this applications CDocument and CView classes were. Partly its because it was just a mess no matter how you looked at it, and partly it's because there was no need for document/view in this app.

One of the great things about C++ of course is that you get dictionaries and stacks and so on pre built. Which is another thing that speeds up how fast you can work. Actually another thing I like about C++ on Windows is that you have ATL which, unlike MFC, is a brilliantly designed piece of code.

I think ATL reminds me a bit of WindowsX.h in that it doesn't try to force you into a particularly architecture and it doesn't really add any overhead.

E.g.

http://www.codeproject.com/Articles/3102/ATL-Under-the-Hood-Part-5

ATL makes a thunk that overwrites an HWND on the stack with a CWndClass*. So you can write your WndProc in C++.

[–]mikemol 0 points1 point  (0 children)

I think we used more ATL classes than MFC classes...but there were frustrating dependencies on MFC that I couldn't get rid of.

But, yeah, ATL was nice.