The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Seriously? I guess that makes sense over there ... mind you, my neighbour was bitten by a spider and had to take months of work because her arm didn't work - some of them in the UK are dangerous: e.g. the False Widow. But that doesn't use it's net as a trampoline to try and catch Drop Bears like some of theirs ...
Sent from my Amstrad PC 1640 Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
I have Visual Studio 2019 installed on my machine. I just built a C++ desktop app from template.
I will continue the shocking part of this story but first a little history...
Long ago (1993) I started learning C++.
The developers in my group at that time were writing a large program using Visual Studio 1,2,3, etc. and developing on the Windows SDK -- SDK style programming which was basically C wrapped up in Microsoft's way of doing things.
MFC : I Thought It Was Fantastic
Okay, but at that same time a fantastic thing was born: MFC (Microsoft Foundation Classes)
This was true C++ wrappers around the API calls. It was quite fantastic and I began to learn it.
It was kind of like C# before C# was released.
I was stuck between these amazing devs who knew Win API SDK style programming and the MFC (which used true OOP). The generation in front of me wanted little to do with these "unnecessary wrappers around the API"
But I continued into MFC.
Finally, around 1999 Microsoft announces C# and I am angry. Java-like? Throw away this investment into the MFC? Well, it'll be okay, because people will come to their senses and see that MFC is already doing all this stuff they're only promising with C#. Yeah, that's the ticket!
I Jump On Board C#
Finally, I jump on board the C# train and it becomes a rocket. It's the Windows API wrapped in OOP. There are missing things (as the .NET libraries become mature) and I understand how to get to those with pinvoke which is based upon my experience with (yes, Visual Basic) and knowing the Win API from MFC, etc.
We Now Return To My Original Shock
So, now, it's like 20 years later and I build a desktop app from the Visual C++ template and what do I see? Original Windows API stuff!!!!
It's the unwrapped, unvarnished message loop!!!
// Main message loop:while (GetMessage(&msg, nullptr, 0, 0))
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
It's the old RegisterClass (not related to OOP and classes but related to WNDCLASS).
The Desktop project template does not allow you to choose the MFC option in 2019.
It may be gone. Interesting.
It could be because it is 2019 Preview 2 and not in yet, but not sure.
EDIT 2 - Found Out How To Get MFC to Install
Ok, I found it way over on the right side in the installer.
There is one checkbox you have to select way over on the right.
That is independent from the item you can see on the left which says Desktop Development with MFC -- which I had already installed. Really terrible. You can see it at: https://i.stack.imgur.com/ue4FM.png[^]
I looked into it when it first came out in the early 1990s. My reactions then was that "This framework takes over so much of the program logic that it will hijack the entire application and make it extremely difficult to adapt to another [i.e. non-Windows] application!"
The application was planned for multi-platform - Windows was certainly not as dominant then as it has become now. Today, making a Windows-only application is perfectly fine. But as far as I have seen, MFC today is no less (rather more than in the beginning!) a "framework" in the straightjacket sense. It dictates how you write your application logic far more than I appreciate. I wanted to see it as a "library" rather than as a framework, a library that could be replaced by another library (on another platform) without affecting the program logic very much. It didn't appear that way to me, certainly not in the 1990s.
For some reason, I never got that same feeling with C# and WPF. Maybe that is because I have more experience now and simply ignore the elements that try to force me into an application design style that doesn't suit me. Porting C# applications to other platforms is not a very relevant question today, nevertheless I feel that I am the master, WPF is my servant. With MFC it was the other way around, as I experienced it.
Most things, yes. I still use it and run across overlooked things on occasion.
What is really angering me right now is how many bugs I have run across and they seem to have zero interest in even addressing them. For example, if I do a build with MFC in a static library my app can't access any 'built-in' resources like bitmaps. This means things like the file browser control won't have bitmaps on its button.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"