How to Get Visual C++ Sample Projects

Latest versions of Visual Studio come with few or no source code project samples. However, there are hundreds available on Microsoft sites. Here is how to get them.

Install samples using Visual Studio 2012 or 2013

For getting samples from Visual Studio IDE, follow next steps:

  1. On the Help menu, click Samples.
    Get Visual C++ samples - step 1
    Get Visual C++ samples – step 1

    If you have Visual Studio 2012 or Visual Studio 2013, the New Project dialog is open.

  2. Expand left-pane tree to the desired category, e.g Visual C++ / Desktop / Win32 / Graphics and 3D, select a sample project from the list, them click the OK button.

    Get Visual C++ samples - step 2
    Get Visual C++ samples – step 2
  3. In the Download and Install dialog, click on Install button.

    Get Visual C++ samples - step 3
    Get Visual C++ samples – step 3

Now, the sample project is added to the installed samples list, which are available each time you want to have a look inside.

Installed samples
Installed samples

Additionally, each time when open an installed sample project, Visual Studio shows a page containing the sample description, a link to download page, plus links to useful resources and tutorials. That’s pretty cool but notice that Visual Studio gets only the samples written for its own version. To get access to all samples, see the next method.

Download Visual C++ samples from MSDN Developer Code Samples

Here is the magic link:
Click it here or type in a browser and get the main Developer Code Samples page. You can filter the articles according to your interests (programming language: C++, platform: Desktop and so on). Moreover, you can type a keyword to refine the filter (e.g. Direct2D) like in the below picture.

Developer Code Samples page
Developer Code Samples page

All to do next is to click on desired link and download.


  • If click Help / Samples in a version prior to 2012, Viusal Studio shows a page containing a link to Visual Studio Samples site.
    Visual Studio 2010 Samples
    Visual Studio 2010 Samples


See also



Leave a Comment