Skip to content

Commit 688b20a

Browse files
author
mtx48109
committed
visual studio 2015 update
1 parent 0bce44a commit 688b20a

3 files changed

+37
-13
lines changed

docs/windows/walkthrough-creating-a-standard-cpp-program-cpp.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,20 @@ To complete this walkthrough, you must understand the fundamentals of the C++ la
3131

3232
1. Create a project by pointing to **New** on the **File** menu, and then clicking **Project**.
3333

34-
1. In the **Visual C++** project types pane, click **Windows Desktop**, and then click **Windows Console Application**.
34+
1. In the **Visual C++** project types pane, click **Windows Desktop**, and then click **Windows Console Application**.
3535

36-
1. Type a name for the project.
36+
> [!NOTE]
37+
> For versions of Visual Studio older than 2017, in the **New Project** dialog box, expand **Installed** > **Templates** > **Visual C++**, and then select **Win32**. In the center pane, select **Win32 Console Application**.
38+
39+
Type a name for the project.
3740

3841
By default, the solution that contains the project has the same name as the project, but you can type a different name. You can also type a different location for the project.
3942

4043
Click **OK** to create the project.
4144

45+
> [!NOTE]
46+
> For versions of Visual Studio older than 2017, complete the **Win32 Application Wizard**. Click **Next**, then make sure **Console Application** is selected and uncheck the **Precompiled Headers** box. Click **Finish**.
47+
4248
1. If **Solution Explorer** is not displayed, on the **View** menu, click **Solution Explorer**.
4349

4450
1. Add a new source file to the project, as follows.

docs/windows/walkthrough-creating-and-using-a-static-library-cpp.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,26 @@ An understanding of the fundamentals of the C++ language.
3737

3838
1. On the menu bar, choose **File** > **New** > **Project**.
3939

40-
1. In the left pane of the **New Project** dialog box, expand **Installed** > **Visual C++**, and then select **Windows Desktop**.
40+
1. In the left pane of the **New Project** dialog box, expand **Installed** > **Visual C++**, and then select **Windows Desktop**. In the center pane, select **Windows Desktop Wizard**.
4141

42-
1. In the center pane, select **Windows Desktop Wizard**.
42+
> [!NOTE]
43+
> For versions of Visual Studio older than 2017, in the **New Project** dialog box, expand **Installed** > **Templates** > **Visual C++**, and then select **Win32**. In the center pane, select **Win32 Console Application**.
4344
4445
1. Specify a name for the project—for example, *MathFuncsLib*—in the **Name** box. Specify a name for the solution—for example, *StaticLibrary*—in the **Solution Name** box. Choose the **OK** button.
4546

46-
1. Under **Application type**, select Static Library (.lib).
47+
- For Visual Studio 2017,
48+
49+
1. Under **Application type**, select **Static Library (.lib)**.
50+
51+
1. Under **Additioal Options**, un-check the **Precompiled header** check box.
52+
53+
1. Choose **OK** to create the project.
54+
55+
- For versions of Visual Studio older than 2017,
4756

48-
1. Under **Additional Options**, un-check the **Precompiled header** check box.
57+
1. Click **Next**.
4958

50-
1. Choose **OK** to create the project.
59+
1. Under **Application type**, select **Static library**. Then uncheck the **Precompiled header** box and choose **Finish**.
5160

5261
## <a name="AddClassToLib"></a> Adding a class to the static library
5362

@@ -76,17 +85,26 @@ An understanding of the fundamentals of the C++ language.
7685

7786
1. On the menu bar, choose **File** > **New** > **Project**.
7887

79-
1. In the left pane of the **New Project** dialog box, expand **Installed** > **Visual C++**, and then select **Windows Desktop**.
88+
1. In the left pane of the **New Project** dialog box, expand **Installed** > **Visual C++**, and then select **Windows Desktop**. In the center pane, select **Windows Desktop Wizard**.
8089

81-
1. In the center pane, select **Windows Desktop Wizard**.
90+
> [!NOTE]
91+
> For versions of Visual Studio older than 2017, in the **New Project** dialog box, expand **Installed** > **Templates** > **Visual C++**, and then select **Win32**. In the center pane, select **Win32 Console Application**.
8292
8393
1. Specify a name for the project—for example, *MyExecRefsLib*—in the **Name** box. In the drop-down list next to **Solution**, select **Add to Solution**. This adds the new project to the solution that contains the static library. Choose the **OK** button.
8494

85-
1. Under **Application type**, select **Console Application (.exe)**.
95+
- For Visual Studio 2017,
96+
97+
1. Under **Application type**, select **Console Application (.exe)**.
98+
99+
1. Under **Additioal Options**, un-check the **Precompiled header** check box.
100+
101+
1. Choose **OK** to create the project.
102+
103+
- For versions of Visual Studio older than 2017,
86104

87-
1. Under **Additioal Options**, un-check the **Precompiled header** check box.
105+
1. Click **Next**.
88106

89-
1. Choose **OK** to create the project.
107+
1. Make sure **Console application** is selected. Then check the **Empty Project** box and choose **Finish**.
90108

91109
## <a name="UseLibInApp"></a> Using the functionality from the static library in the app
92110

docs/windows/walkthrough-creating-windows-desktop-applications-cpp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Next, you'll learn how to create the code for a Windows desktop application in V
107107
For information about the parameters and return value of this function, see [WinMain entry point](https://msdn.microsoft.com/library/windows/desktop/ms633559).
108108
109109
> [!NOTE]
110-
> What are all those extra words, such as `CALLBACK`, or `HINSTANCE`, or `_In_`? The traditional Windows API uses typedefs and preprocessor macros extensively to abstract away some of the details of types and platform-specific code, such as calling conventions, **__declspec** declarations, and compiler pragmas. In Visual Studio, you can use the IntelliSense [Quick Info](/visualstudio/ide/using-intellisense#quick-info) feature to see what these typedefs and macros define. Hover your mouse over the word of interest, or select it and press ctrl-K, ctrl-I for a small pop-up window that contains the definition. For more information, see [Using IntelliSense](/visualstudio/ide/using-intellisense). Parameters and return types often use *SAL Annotations* to help you catch programming errors. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](/visualstudio/code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects).
110+
> What are all those extra words, such as `CALLBACK`, or `HINSTANCE`, or `_In_`? The traditional Windows API uses typedefs and preprocessor macros extensively to abstract away some of the details of types and platform-specific code, such as calling conventions, **__declspec** declarations, and compiler pragmas. In Visual Studio, you can use the IntelliSense [Quick Info](/visualstudio/ide/using-intellisense#quick-info) feature to see what these typedefs and macros define. Hover your mouse over the word of interest, or select it and press **Ctrl**+**K**, **Ctrl**+**I** for a small pop-up window that contains the definition. For more information, see [Using IntelliSense](/visualstudio/ide/using-intellisense). Parameters and return types often use *SAL Annotations* to help you catch programming errors. For more information, see [Using SAL Annotations to Reduce C/C++ Code Defects](/visualstudio/code-quality/using-sal-annotations-to-reduce-c-cpp-code-defects).
111111
112112
1. Windows desktop programs require &lt;windows.h>. &lt;tchar.h> defines the `TCHAR` macro, which resolves ultimately to **wchar_t** if the UNICODE symbol is defined in your project, otherwise it resolves to **char**. If you always build with UNICODE enabled, you don't need TCHAR and can just use **wchar_t** directly.
113113

0 commit comments

Comments
 (0)