MFC multibyte support - visual-studio-2017

I got a build error MSB8031 and I was redirected to Microsoft where it says
The Unicode and MBCS MFC DLLs are installed with the Desktop development with C++ workload when you select MFC and ATL support from the Optional Components pane.
I went there by going to the contral panel / programs and features, using "change" on the Visual Studio 2017 entry.
Since the entry "MFC and ATL support" did not exist, I followed the next advice:
If your installation does not include these components, navigate to the File | New Projects dialog and click the Open Visual Studio Installer link.
It seems to open the exact same window and there is no entry called "MFC and ATL support".
How do I get multibyte support in VS 2017, version 15.9.12?
Note that there is both "Visual C++ ATL for x86 and x64" and "Visual C++ MFC for x86 and x64" already checked, if that was meant.

These steps apply for Visual Studio 2017. If there are Visual Studio 2013 projects in the solution, opened with VS2017, you may see this:
In that case, you have to install Multibyte Support for Visual Studio 2013, not 2017.

Related

ATL is not working when migrating to Visual Studio 2015

I have a project which uses an ATL component to create pie charts. It's working fine in Visual Studio 2010 but when I migrate it to Visual Studio 2015, its not working or not instantiated. It's crashing at runtime
I have installed VS 2015 with the C++ support on Windows 7.
I have set the platform toolset to v140.
I have installed the VS 2015 x86 redistributable package .
Target platform version 8.1.
Tried adding ATL support in existing MFC project by ATL wizard. This causes crash in ATL (_pModule == 0) and some Dlls also not registered due to this change so I had to revert the changes.
Why do you add ATL again support?
As far as I understand your question this is an existing project and has ATL support! The ASSERT simply tells you that you have two ATL modules.

How to create an "ATL Project" in Visual Studio Community 2015?

This 2004 tutorial tells me to choose Visual C++ Project / ATL Project in the Visual Studio new project wizard.
PROBLEM: The ATL project type does not seem to exist in my Visual Studio Community 2015.
QUESTION: How to make this option appear? If impossible, what is the nearest option? Tho goal is to write a shell extension in C++.
ATL project support was not installed. To fix this:
Click on the Install Visual C++ 2015 Tools seen in the screenshot above.
Let the download and installation happen
Open the New Project dialog again: The New ATL Project option should appear.
It is doable with the Community version.

MFC Multibyte Add-on for Visual Studio 2015 Express for Desktop

I'm using VS 2015 Express for Desktop which doesn't have MFC Multibyte support by default.
Not long ago there was a separate MFC MBCS DLL Add-on.
But now link to Multibyte MFC Library for Visual Studio 2015 is removed.
That was done because all other VS editions have "Microsoft Foundation Classes for C++" optional install component:
But VS 2015 Express for Desktop lacks it (it has no optional install components, no "Custom" installation at all)
So the questions are:
Maybe someone has a backup link to the download Multibyte MFC Library for Visual Studio 2015?
I've also downloaded VS 2015 Community Edition ISO. In the \packages\VisualC_D14 there are several VC_MFC.* folders (VC_MFC.MBCS among them). But trying to run executables inside that folder leads to an error
Maybe someone knows howto install that components without running whole VS 2015 Community Edition setup?
Thank you in advance.
P.S. Installing VS 2015 Community Edition instead of VS 2015 Express for Desktop is not suitable for my company due to license limitations (we are enterprise organization - over 250 PCs - and use VS for commercial purposes).
Unfortunately changing the character set from multibyte to Unicode in our projects is also not an option for us now.
I have one solution for this. kindly follow the steps to add MFC for C++
step 1: close any Opened Visual Studio.
Step 2: open a Visual Studio and choose File->New -> Project
Step 3: In New Project Pop UP, Select Templates->Visual C++ -> MFC
Step 4: In the Listed Project/files, you will see "Install Microsoft
Foundation classes for C++". Double Click on it.
Step 5: "Install Missing Features" Popup Come with two Button
"Install and Cancel". Saying "Install Microsoft Foundation Classes
for C++. You Simple Click on "Install".
Step 6: Important "Close the opened VS" and you will see Visual
Studio Setup Wizard come with option "Microsoft Foundation Classes"
Within Features Tab. Just Click on "Next" and then a new Window
Appear click on "Update". Your MFC will start updating.
Step 7: Enjoy coding.....
As far as I see my installation the files are always installed if you install the MFC.
I just rechecked it on a different machine. The appropriate MBCS libs are installed by Default, when you choose MFC in the installation of VS-2015.

Afx Unsupported in Windows 10/ Visual Studio 2015

I retargeted an MFC solution from Visual Studio 2013 to Visual Studio 2015, but when I built it I received an error telling me the compiler could not find afxdisp.h normally found under VC->atlmfc->include . -- Of course I copied the file from the VS 2013 location, but I was wondering why it was missing? Does anyone know?
My mistake, MFC is an addon in VS, and I did not have all of it (only had ATL). I relaunched installer went to custom install and clicked MFC classes. I also installed the Multibyte MFC library from the Visual Studio Website. It is not available in the custom options.

MBCS Error building MFC C++ project with Visual Studio

I opened my existing MFC project using Visual Studio and when I build I get the following error message:
Error 1 error MSB8031: Use of MBCS encoding in MFC projects require an additional library to be downloaded and installed. Please see http://go.microsoft.com/fwlink/?LinkId=286820 for more information. C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\v120\Microsoft.CppBuild.targets
What is this about?
This error message is due to the missing MBCS MFC package. Starting with Visual Studio 2013, MBCS portion of the MFC library has been broken out of the Visual Studio product into its own separate download. Installing this package and rebuilding should fix the problem.
The download is available here
More information about this change is available here
Update for Visual Studio 2015
Starting with Visual Studio 2015, the entire MFC C++ library (including the MBCS pieces) is an optional install component. While installing VS2015, if you select C++ and MFC, you will also get the MBCS library.
Instead of installing an add-on, you may consider changing the character set from MBCS to Unicode.
This is done in the project properties as is depicted below.
For Visual Studio 2015:
According to Redistributing the MFC Library article on MSDN, there are no mfc140.dll files in redist directory (c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86).
The mfc140.dll files were omitted from the redistributable files
directory in Visual Studio 2015 RTM. You can use the versions
installed by Visual Studio 2015 in the Windows\system32 and
Windows\syswow64 directories instead.