top | item 21462332

(no title)

elweston2 | 6 years ago

MFC was built for a reason. To provide that doc/view/OLE GUI. If you wander too far away from that it becomes well, lets just say, 'interesting' to use. I would many times just include MFC just to get some of those helper classes though. CString was way ahead of the game. C++ did not get a std::string standard that most people could use until well into the 2000s. Its database classes were good in a pinch to abstract away the nitpicky junk in ODBC. Then C++ took a 15 year sideways journey into getting templates right. During that time MS created C# and basically took away any reasons to really use MFC and C++ on windows for business applications.

discuss

order

72deluxe|6 years ago

I did some MFC for my job and disliked it. It didn't help that the software in my job was made up of thousands and thousands of COM objects and everything felt like treacle to write (got to implement those interface functions I'm never going to use!).

I have used wxWidgets a lot and really like it, but for modern C++ on Windows what do Microsoft recommend?

I can't seem to get any idea. Honestly, I would like to know.

elweston2|6 years ago

COM was not really well designed to be consumed from C++ that is why it felt horrible to you. It was designed for visual basic and Office. If I never see another VARIANT I will be soooo happy. ATL made COM better to use but not much. In visual basic a COM object was dead easy to make and manage. In C++ it came with a bunch of baggage of extra API's to fiddle with and no real clear direction how/why to do so.

I do not know what MS would recommend these days. From my point of view they basically functionally abandoned it but dragged it along because most of their stuff was built with it. The .NET libs was where all the new stuff was going (WPF, WinUI). WTL may be worth a look it looks like it comes out of the ATL/MFC lineage.