Visual studio help

Not really the right place to ask this, I know, but hoping someone could help as I have no where else to turn to. I need to make an application, and it is my first time doing so with a UI, and i have no idea what i need to select in VS. I look up tutorial on youtube and found a video saying CLR, but I do not have that option. I have the option for windows desktop application which says it has a GUI but it starts with a whole bunch of random code. I am just looking for, basically an empty project that I can built the GUI upon. Thank you if anyone can help with this
Which Visual Studio version are you using? 2017 and 2019 have different ways to create an empty (no source code) project.
I have both versions, so what either one you can tell me i will use
Hello MyOnlinePersona,

I use VS2017. I have not installed 2029 yet.

For the first time you will most likely have to start with (File -> New -> Project) to open the window to create a new Solution/Project.

On the left side of the window expand the heading (Installed), if not already, expand (Visual C++), if not already, and click on Other.

In the middle pain there may be three items with the first (Empty Project) highlighted, but greyed. Click on (Empty Project) and it should change to a blue background.

At the bottom of the window double click in the text box for (Name:), it may say (Project1) and later (Project2) or (3). Type in a name. This will be duplicated in the text box for (Solution Name:) although you can enter a different (Solution Name) if you want.

Be sure to check the (Location:). This will likely be (C:\users\...\source\repos) with the (...) based on how you set up your computer. You can change the location if you wish to store your files somewhere else, but watch this location each time because I have seen mine revert back to the (C:\users\..) at times. Even after I have changed it in (Tools -> Options).

Press Enter to accept what you have done and you will be taken to an empty screen.

From here I press the short cut keys (Ctrl + Shift + A) to add a file to the Project. You can also use (Project -> Add New Item:) from the menu tab.

In the (Add New Item) window I get three choices [C++ File (.cpp)], [Header File (.h)] and [C++ Class]. The [C++ File (.cpp)] choice is highlighted in grey and at the bottom of the window it should say (Source.cpp) in the text box. Double click in the text box to highlight the name to change it.

A suggestion: I use (Main V1), V meaning Version, for the file that contains the "main" function. You are free to choose any name that you want, but you may want to include "main" in the name for the future so that you know which file contains the "main" function.

Press (Enter) or click (OK) when done.

This leaves you with an empty window to enter your code in.

I have found this to be easier than letting the wizard create a file with code, some of which is not needed.

I do not think I have missed anything, but if this does notwork let me know.

Hope that helps,

Andy
I need to make an application, and it is my first time doing so with a UI

Have you considered Qt, QtCreator? The community editions are free.

https://doc.qt.io/qt-5/windows.html
https://www.qt.io/product
Easiest way to create an empty (no generic source code generated) project in VS, 2017 or 2019, is with the Windows Desktop Wizard. It lets you choose the type of project -- Console, traditional Win32 Desktop, DLL or static library -- with options to generate or not sample source code, as well as an option to use/not use precompiled headers.

File->New->Project.

Or start the process with CTRL+Shift+N.

In my VS 2017/2019 I also added an optional keyboard mapping for File.NewProject: CTRL+Shift+P, CTRL+Shift+N and set that for Global use.

Here's where the differences between the VS versions happen.

VS 2017 New Project Dialog:
---------------------------

Left-hand side, expand the Installed node, and then expand the Visual C++ node (if it isn't already). Select the Windows Desktop node and in the middle window you get various project types to select....Console App, Windows Desktop App, etc.

Select Windows Desktop Wizard. The other options generate generic code for the selected app type.

VS 2017 chooses a project and solution name for you, and a location where the project files will be located. Change if you want or not.

Ok, about projects and solutions. In VS a project is a single app with all the source and resource files grouped together to create an executable, DLL, whatever.

A solution contains one or more projects. If you are creating an app that uses a custom DLL you create your solution would contain 2 (or more) project. The DLL project, and the DLL-using app project.

https://docs.microsoft.com/en-us/visualstudio/ide/solutions-and-projects-in-visual-studio?view=vs-2019

After selecting Windows Desktop Wizard and setting your solution/project names and location select OK.

Windows Desktop Project dialog. Here is where you set the type of app you want to create, Console App is default in the pull-down. Check Empty project and UN-check Precompiled header. Select OK.

I really, really, REALLY recommend you not use precompiled headers. Precompiled headers can create more compile-time head-aches than they solve. For most projects precompiled headers don't save much time, if any.

VS 2017 hints you can use the Empty Project template to create an empty Console project. And only when choosing a Console project.

The Empty Project template is under the Other node under Visual C++, and bypasses the project wizard selection step(s).

If you are planning on having most of your projects be C++ console apps, I'd recommend using the Empty Project template.

After selecting OK VS 2017 creates the files and folders needed for your project.

If you created an empty project you can now add pre-existing source files to the project hierarchy. Or add new, blank, source files as needed.


VS 2019 Create a new project Dialog:
------------------------------------

Left side of the dialog is your Recent project templates section. The right hand side is where you choose the type of project you want to create.

If you want an empty Console app, choose the Empty Project template.

If you want to create an empty project of another type (Win32 API for example), choose the Windows Desktop Wizard template.

You now see the Configure your new project dialog. Letting you set the project/solution name and location.

Select Create and VS creates the empty project.

If you selected the Windows Desktop Wizard hitting Create brings up the Windows Desktop Project dialog. Select the project type from the pull-down menu (Console is default), check Empty project and UN-check Precompiled header.

Select OK and VS 2019 creates your shiny new no source code project.
Topic archived. No new replies allowed.