第一步:环境的搭建,比较简单,不做介绍(win8及以上、VS2013、Kinect V2)
第二步:新建空项目,然后我们将一个Demo中的stdafx.h中的内容拷贝过来
//------------------------------------------------------------------------------
// <copyright file="stdafx.h" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
// include file for standard system and project includes
#pragma once
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers //不包含Windows中很少使用的头文件
#endif
// Windows Header Files
#include <windows.h>
#include <Shlobj.h>
// Direct2D Header Files
#include <d2d1.h>
// Kinect Header files
#include <Kinect.h>
#pragma comment (lib, "d2d1.lib")
#ifdef _UNICODE
#if defined _M_IX8