请教高手解释一下这些代码vc头文件

来源:百度知道 编辑:UC知道 时间:2024/09/24 00:32:00
// SnowWorld.h : main header file for the SNOWWORLD application
//

#if !defined(AFX_SNOWWORLD_H__D87D3D0A_E206_45A5_A88E_B6605E0BBD57__INCLUDED_)
#define AFX_SNOWWORLD_H__D87D3D0A_E206_45A5_A88E_B6605E0BBD57__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h" // main symbols

/////////////////////////////////////////////////////////////////////////////
// CSnowWorldApp:
// See SnowWorld.cpp for the implementation of this class
//

class CSnowWorldApp : public CWinApp
{
public:
CSnowWorldApp();

// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSnowWorldApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL

// Implementati

都是些消息映射,MFC自带的,没必要研究。
创建的时候自带的。很基础的。同学。再看看书!~~~

#if !defined(AFX_SNOWWORLD_H__D87D3D0A_E206_45A5_A88E_B6605E0BBD57__INCLUDED_)
#define AFX_SNOWWORLD_H__D87D3D0A_E206_45A5_A88E_B6605E0BBD57__INCLUDED_
#endif

确保只被编译一次,避免重复编译错误

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
对不同版本的处理

//}}AFX_VIRTUAL 等是给编译器用的辅助符