|
I never left MFC because I refused to, back then, to use interpreter, garbage-collecting Java or its knock-off, interpreter C#. I use the latest C++17/20 community compiler, VS2019, and for free. The IDE serves me well too and I can configure it to compile today on any platform and machine setup I want. Every few years I have to re-seat my programs, though, since their MFC under-pinnings do change over time, the pch.h being one of them. From my perspective, Microsoft's most brilliant move was to humbly throw C# onto the Github code dump, hire Herb Sutter, the C++ ISO committee chair, and change all its docs to C++ examples. The code I daily write with modern C++ in modern MFC connecting to ultra-modern MFC GUI libraries like BCGSoft's BCGControlBar GUI library, is becoming more and more ODR compliant and maintainable, and even elegant. Doggedly hanging onto past versions of past versions of your programs (not to mention OSes), as well as past IDE versions are, IMO, not taking advantage of the 1000s of paid developers improving them. And as for C++, I am eagerly waiting for C++20 with Modules and C++23's Networking so I revamp my many MFC projects and evolve away from problematic dllimport/dllexports and Winsock2 (C++23 Networking will look very much like Winsock2 is my guess). Will it take time to re-do my projects? Yes. But this is where technical-debt comes from: taking the easy way out until everything breaks. Herb Sutter said in one of his posts that there were ~200 papers addressing/modifying/correcting C++ features last year, up from ~125 the year before. There is no comparison in long-term robustness of a language supported by the world's voting body (ISO) to a company who is only beholden to its shareholders (think: Microsoft's C#). Of course, if you are writing programs that don't need to survive the test of time, then I guess interpreters will do. I don't have that option. 40 years ago, Bjarne Strustrup invented C with classes and transformed programming with his principles. 29 years ago, Microsoft went all in on C++ and produced MFC. In the past few years, Microsoft has elevated MFC back on top. Go Microsoft. Excellent use of your trillions of dollars. Now, back to my MFC programming, but I thought it was worth the time to describe the other side of views on MFC. Avoid updating VS is silly advice.
|
|
|
|
|
rtischer8277 wrote: Avoid updating VS is silly advice. Not if you don't have the time / mood to re-do all your work.
I have given the "heads up" for the people to avoid surprises like mine. That from one day to the other... pam, you HAVE to.
This way, the ones that want to keep it up to date as you (and actually me too) have the possibility to plan it.
The ones that don't want to be forced to update... now they know, they have to stay in their current version.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I hit this wall quite a while back. I'm frozen at VS2017 15.7.6 because the subsequent versions of VS2017 broke the compiler for some of our legacy projects. Any VS version newer than 15.7.6 will result in memory buffer overflows while compiling these projects. Granted, these particular projects use an excessive amount of shared memory storage and other likely non-optimal code practices, but the older compiler handles them just fine.
|
|
|
|
|
So many people are so quick to jump on use of mfc... lol
I have to use a variety of technologies at my job. We have a large project in MFC, several C# WPF apps, and then many many flavors of embedded applications, some bare metal, and some have OS's (linux, threadX, even GHS integrity). There are even some older 16 bit windows programs that customers STILL use which I refuse to work on...
Anyhow, I can most definitely understand how people use MFC still... there is simply no time to convert everything. And if you are adding on to someone else's native project via DLL's, bringing in .NET will cause too many managed-unmanaged transitions and give you a slower end result.
Back to your question. I have 2019 installed as well. I have no option for wizard creation of an MFC "console" project. But, I do have one for a Windows console project. I was able to pick this one, it created the project. I then went to project properties and picked "Use MFC" and then I added "#include <afxwin.h>", and then I was able to use some MFC. Yes, I agree, it did not do everything for me, but it definitely wasn't that hard... I feel like maybe I had to do this before and they used to have an option for "include MFC headers" when you made a Windows SDK console project. Guess that is gone.
|
|
|
|
|
DanM2 wrote: So many people are so quick to jump on use of mfc... lol Need to add functionality to a legacy project
DanM2 wrote: Back to your question. I have 2019 installed as well. I have no option for wizard creation of an MFC "console" project. But, I do have one for a Windows console project. I was able to pick this one, it created the project. I then went to project properties and picked "Use MFC" and then I added "#include <afxwin.h>", and then I was able to use some MFC. Yes, I agree, it did not do everything for me, but it definitely wasn't that hard... I feel like maybe I had to do this before and they used to have an option for "include MFC headers" when you made a Windows SDK console project. Guess that is gone.
My biggest rant was not for the I can't create a project with MFC (although I hadn't found the "C++ Windows desktop wizard" yet).
My biggest problem is that the old projects with #include "stdafx.h" won't compile now because the new standard is with #include "pch.h" and #include "framework.h". So far I have added the VC++ v141, I have edited project properties (but not the project file directly) and tried to add it manually... that didn't work.
I have given up for a while, because I have started my tests in the new structure and want to finish them first.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Yesterday we had 6 or 7 brown outs / electric flickers due to weather and then fix.
My cable modem and wifi router (separate units) are powered on the same home circuit and got power-cycled 6 or 7 times also. It was really annoying and sent me on a search for a UPS.
But as I read about UPS it seems as if they are all a bit dangerous. So many reviewers say that their units emitted sparks and/or fire and if they had not been home when it happened it would've been disastrous.
What is your experience with this? Are these things safe?
I was looking at APC ones but then also saw this one which seems good.
CyberPower CP1000AVRLCD Intelligent LCD UPS System, 1000VA/600W, 9 Outlets, AVR, Mini-Tower [^]
Any experience with any of these? Thanks for any reccommendations.
|
|
|
|
|
I've had a UPS for years and the only problems I've ever had is the battery goes out every few years.
I've got a CyberPower 1500
I'm not sure how many cookies it makes to be happy, but so far it's not 27.
JaxCoder.com
|
|
|
|
|
Thanks for the input. Good to know which one you're using.
|
|
|
|
|
My personal unit is an APC 550 which I've had for about 9 years. I got about 3.5 years from the first battery and the current battery is 5.5 years old. [Either I got lucky or the batteries are better.] This unit beeps and warns when the battery is failing, and it was easy to replace.
My work unit is a Tripp-Lite ECO580, and it's about 4 years old. Yesterday I discovered the battery is completely dead when I experienced 8 brown outs (very unusual), and my monitors went dead each time. The monitors are plugged into the battery side while the laptop is plugged into the surge protection only side.
Before buying a unit, ensure the battery can be replaced.
My first unit (cannot remember the brand) did not have a replaceable battery, so when the battery failed I had to recycle the entire unit. Both it and the APC cost about $75 USD, while the price for the battery for the APC was $25.
BTW: the units I'm familiar with have 2 rows of outlets -- one is surge protection only and one has surge protection + battery.
Plug only necessary items into the battery side. My personal unit has the CPU, monitor, cable-modem, and wifi router plugged into the battery side -- other items are plugged into the surge-only side. The battery power of a home unit is limited, so the more devices you have on battery, the faster it is expended.
Use the home unit to protect from brown-outs and provide time to gracefully shut down the system in the case of a full power failure.
|
|
|
|
|
Great info. I will keep these things in mind as I research what I will buy. Thanks very much for sharing.
|
|
|
|
|
I did a quick search on surge protection. While the UPS has surge protection, one article suggested buying a separate surge protector to protect the UPS. A strong surge can damage the UPS, and a surge protector is cheaper to replace than the UPS.
This makes sense. The surge protection capability of a device is limited an erodes with usage. An old surge protector is nothing more than a power strip; it's necessary to replace surge protectors on a periodic basic. This article[^] explains how surge protection works.
I found several articles that recommend replacing the surge protector every 2 years, and if the unit is 10 years old, it's worthless as a surge protector.
It's a good bet my APC has no surge protection left, and the surge protector on my main TV is 15 years old and the one on my smaller TV is even older ... so I'll be making purchases this weekend.
|
|
|
|
|
BryanFazekas wrote: I found several articles that recommend replacing the surge protector every 2 years
2 years...
Sounds like articles written by someone selling surge protectors and/or UPSes. Also, Amazon reviews are known to frequently be written by shills working for competing products.
Bad car analogy: Looks at the maintenance schedule in you car's owners manual. If you followed it to the letter, your car would be at the dealer for servicing more often than it would be parked in your own garage.
|
|
|
|
|
dandy72 wrote: Sounds like articles written by someone selling surge protectors and/or UPSes. Also, Amazon reviews are known to frequently be written by shills working for competing products.
Nope -- This was on several independent how-to sites. I use Amazon reviews ... but take them all with a 5# bag of salt.
Read the article I posted -- it describes how surge protection works. It appears there is no clear-cut way to determine if surge protection is still working, so taking into account how stable power is in your area AND how many joules your surge protection is rated for, the interval will differ.
Two years seems too short an interval. I 'spose it comes down to how risk-tolerant anyone is. If you have $2,000+ in equipment, spending $10/year on surge protection seems trivial.
Power in my area is typically very stable, yet I had 8 brownouts in a 30 minute period yesterday. Four years ago we had a lightning strike on a tree in my backyard, it burned out my router but didn't destroy the cable-modem. In hindsight, I should have replaced all surge protection at that time.
I'm researching units today as I have 2 units that are 15+ years old and a third is 5.
|
|
|
|
|
The way I see it, if lightning strikes are a worry, then a 10$/year surge protector isn't going to do much and you'll need something a lot more bad-ass.
That's where insurance comes in anyway. So.......
Not suggesting anyone should do without. Just saying if your insurance covers it anyway, I see little problem in stretching the lifetime a bit more than the "recommended" timeframe.
|
|
|
|
|
Lightning strikes are not a major concern, just a possibility. I included it for illustration.
Note that my router was destroyed, but all my other equipment was on the inside of the surge protection, and all of it survived unscathed. The surge protection DID make a difference.
Insurance may cover the cost of replacement, but it does not address the down time until replacements are installed, and it does not address the loss of data if your PC blows between backups.
Like many in IT, I'm WFH at this time. I cannot afford down time, in a very literal ($$$) sense, and insurance will not cover that.
YMMV
|
|
|
|
|
I have a CyberPower 950VA in my office with computers & router and a smaller model in the living room for the TV and other components. I got them 2 months ago and they work great and have had to activate a couple times.
|
|
|
|
|
Good to know. Thanks for manufacturer and model info.
|
|
|
|
|
I've probably got about 60 years runtime with various UPSes over the last 25 years. Never had a failure more serious than a battery declining to the point it couldn't keep the supported system online long enough to safe shutdown (generally 3-5 years before a new battery is needed). Mostly APC models - initially 300-600VA 'shoebox' models, subsequently entry level ($150 class vs $400 for the next level up) 1200-1500 VA 'mini-towers'); although my most recent model is a Cyberpower. I switched at the time for 2 reasons (not sure if either is still valid) - APCs newest entry level tower was getting a lot of complaints over an obnoxiously noisy fan when it was running, and modern Active PFC power supplies are pickier about the quality of AC waveform they get (lower runtime or in previously barely able to a power a system cases outright shutdown with simpler designs) but APC was only offering a stepped square wave at the $150 level and wanted $400 for a modified sine wave (AFAIK this just adds an extra component to slope the voltage transitions up/down) vs most of their competition offering it at the $150 point.
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Great info. I was wondering why a lot of people seem to be switching from APC to CyberPower.
I remember a company I worked for during Win3.1 days having APCs and they worked well, but that was a long time ago.
|
|
|
|
|
They are brilliant!
But ... avoid the Chinese ones: it took three attempts to get one to me in a working condition (batteries are HEAVY and couriers treat "FRAGILE" as a challenge ...)
It lasted a year, and then the electronics went: it would switch over but it immediately turned itself off ... the batteries were fine, but it was useless.
Do I have one now? No - but I will again when I get around to it.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: They are brilliant!
That's how I feel about them -- even though I've never had one, only seen them in action at various workplaces.
OriginalGriff wrote: But ... avoid the Chinese ones:
I know there are a lot of knock-off products when ordering thru Amazon and I think people at various times end up with the knock-off instead of the real devices and I'm wondering if that is what is happening to some buyers which experience the sparks & fires. I would think the real things would have to be able to 100% prevent that.
Thanks for info.
|
|
|
|
|
OriginalGriff wrote: avoid the Chinese ones Surprise !
Recharge Your Memory[^]
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Oh, before I forget - check the power supply on your computer: some of them do not like "chopped" square wave, and may insist on a "proper" sine wave input. Some UPS's will give that, some won't.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OriginalGriff wrote: check the power supply on your computer:
Thanks for info. That's why I was looking at the CyberPower ones.
In my case I'm really wanting to power up the wifi router and cable modem so I'm guessing that since they have external power supplies even the square wave ones would probably work?? Not sure though.
Thanks
|
|
|
|
|
Hi Paul if you ever get around to buying another UPS give me a shout and tell me what you've decided on - I use a SBC as a jenkins and local nuget server for my home and shared projects and it's on 24/7 , I know it's not on the same scale as powering a server but the dear litle box is very useful and a PITA to rebuild ( despite my having an image of the base build )
"We can't stop here - this is bat country" - Hunter S Thompson - RIP
|
|
|
|
|