zoukankan      html  css  js  c++  java
  • stdafx.h和targetver.h的作用

    stdafx.h和targetver.h的作用

    1 stdafx.h作用及原理

    1.1 简介

    stdafx.h名称的英文全称为:Standard Application FrameworkExtensions

    所谓头文件预编译,就是把一个工程(Project)中使用的一些MFC标准头文件(如Windows.H、Afxwin.H)预先编译,以后该工程编译时,不再编译这部分头文件,仅仅使用预编译的结果。这样可以加快编译速度,节省时间。

    2 targetver.h的作用

    定义程序运行的环境,如限制程序只能在XP下运行,限制程序在只能在Vin7下运行,或限制程序只能在XP以上系统运行,或限制程序只能在Server2003以上系统运行...

    用法:

      

    #ifndef WINVER                	  //程序中没有定义WINVER宏时
    #define WINVER 0x0600            // 定义WINVER为0x0600    //0x0600表示Windows Vista
    #endif
     #ifndef _WIN32_WINNT                // 程序中没有定义_WIN32_WINNT宏时
    #define _WIN32_WINNT 0x0600     // 定义_WIN32_WINNT为0x0600    //0x0600表示Windows Vista
    #endif

     附:

      

    0×0500 表示Windows 2000,

    0×0501为Windows XP,

    0×0502为Windows Server 2003,

    0×0600 为 Windows Vista。

     

    参考博客:https://blog.csdn.net/google0802/article/details/9034085

  • 相关阅读:
    SPOJ 8093 JZPGYZ
    UVA1030 Image Is Everything
    UVA11996 Jewel Magic
    UVA11922 Permutation Transformer
    UVA1479 Graph and Queries
    P3224 [HNOI2012]永无乡
    UVA11020 Efficient Solutions
    UVA12206 Stammering Aliens
    UVA11107 Life Forms
    UVA11019 Matrix Matcher
  • 原文地址:https://www.cnblogs.com/juluwangshier/p/12760305.html
Copyright © 2011-2022 走看看