Visual Studio 2017 - can't find Visual C++ Windows Forms - c++

So, I'm in awkward situation - I wanted to create Windows Form App using Visual Studio, but I can't find any place to create Visual C++ Windows Form template. I tried even to reinstall Visual C++, add other libraries and search answer online - no results.
I can of course create new Winforms in C#:
But not in C++:
Also, all possible modules in Visual Studio Update was checked:
I tried even add template from Online list:
What should I do next? I use Visual Studio 2017 Community Edition.

Ok, I found a working way to creating Windows Forms in Visual Studio 2017.
Create new CLR Empty Project:
Add .cpp file for main function.
In project add new item from UI->Windows Forms:
(If we didn't add main loop before the error will occur)
Now we can add new elements to form from the Toolbox to the left (i spent measurable time looking for that).
To run application we have to declare this instead of main function:
Also we need to tell Visual Studio that we are making Windows Application instead of Console Application:

WinForms designer support for C++/CLI was dropped a long time ago in VS 2012. MS suggests using C# for your WinForms code, and only use C++/CLI if you need to interop with native code.
And if you do end up using C++/CLI for interop, keep that layer as small as possible. It's a second-class citizen in the .NET world and isn't even mentioned in Microsoft's recent post on their language strategy.

Related

Visual Studio MFC C++ "CFormView" Missing from "base class" drop down

I am a beginner learning Visual Studio 2019 Community. Specifically MFC C++.
It is challenging as I am struggling to find good reference material and examples. Youtube has been very helpful for tutorials and examples. However, all the information I have found are using earlier versions of Visual Studio which are not a step by step process. I have found myself doing additional research or experimenting to find the same tool used in the example.
My current issue is the example creates a new class with the base class type of "CFormView". However no such value exists in my version of Visual Studio.
With that being said. I have two questions.
Please advise on how to create a CformView class in VS.
Is there any good quick learning guides for MFC in VS 2019? It would be great to have tutorials.
Thank you in advance.
VS2017 and VS2019 have become difficult development environments to continue program development with MFC/ATL.
If you want Wizard-guided development as you've seen in previous books and resources, the best shortcut is to go back to VS2015 and port the results to VS2017 or VS2019.
I have similar answers to similar questions several times.
For example, see these answers and their links.
How to add database to MFC project in Visual Studio 2017?
I am missing the Add new item Add "MFC Class From Typelib" in VS-2019
The big ATL wizard misery.
Deprecations - Visual Studio 2019
Add ATL Simple Object in Visual Studio 2017
Changes to Project Templates and Code Wizards in 15.3
Visual Studio 2017 version 15.3 Release Notes

Word (Office) Automation Visual Studio 2013 C++

I have to make a program which can operate with Word documents (edit, view, create) and use C++ with Visual Studio 2013.
I have searched the net and found out VSTO is only available for Visual Basic and C#.
On the Microsoft site there is "How to create an automation project using MFC and a type library" here but seems it is written for very old versions of Visual Studio (like 5.0 and 6.0). When I reach the ninth step "Select the Automation tab." it seems there is no such tab in ClassWizzard in my version of Visual Studio.
Is there any way to perform automation with C++ in newer versions of Visual Studio like 2013?
I found a way here. Actually I am using the "import" method and it worked for me in console mode(COM method also worked, but it seems to me more complicated), I haven`t tested it for GUI yet. There is not C++ documentation, but can be used Visual Basic API with a bit thinking here.

Visual Studio 2015: Can't create a new empty project c++

I recently got the new version of Visual Studio and I can't seem to find how to create an empty project for C++. The options seem to be only C# and Basic.
The default (typical) installation of Visual Studio 2015 no longer contains the C++ compiler and tools. This was a very popular ask from the community as many developers do not want the footprint C++ brings.
If you go and try to uninstall Visual Studio 2015, the installer screen will pop up and you'll see a button named "Modify". This will change your current installation. Do a custom install and pick the C++ features / libraries that you require.
As far as I know, most editions have C++ support, including Express for Windows, Express for Desktop and the popular Community edition.
Try to open VS with Admin's rights. I tried it, and it works!

Embed Visual Studio editor into my app

Is it possible to embed Visual Studio 2010 (Express ?) source code editor into my application.
What is another most preferred way to interconnect my application with Visual Studio?
Don't want to embed my app into visual studio for some religious reasons =)
If you don't want to make your application a plug-in then make a plug-in that provides an interface for your application using some sort of IPC.
Also see Embed Visual Studio 2010 Editor into a Tool Window. As far as I understand, application has to be a plug-in/extension in order to do that.
MSDN How to: Get References to the DTE and DTE2 Objects
http://msdn.microsoft.com/en-us/library/68shb4dw.aspx
is interesting starting point for solving my problem.

Function/variable auto completion C++ in visual studio 2010

I created 2 games using the visual studio 2010 for WP7 using XNA and when trying to create one using c++ in visual studio I dont know how to turn on the auto completion thing. When for example I wanted to write a function/variable, I just used to write the first 2 letters then choose it from the list. This helps me save time but I dont know how to turn this feature on when writing in c++
Best Regards
Sounds like you're using C++/CLI, since you said both C++ and XNA (.NET).
Visual Studio 2010 doesn't have Intellisense for C++/CLI. It should be added back in the next version, or you can buy Visual Assist X from Whole Tomato Software, which not only supports C++/CLI but does a better job on C# and native C++ as well.
If you don't intend to use .NET, you can get Intellisense working by turning off the /clr compiler option.
Hit CTRL+SPACE after typing a few letters.