zoukankan      html  css  js  c++  java
  • 控制台应用程序中添加对MFC的支持

    在windows控制台应用程序中,肯能会想使用一些MFC中的类,如CStringArray等,通过下面两步简单的设置可以添加对MFC的支持:

    1、右击工程名 -> References 选择 All Configuration

     ->Configuration Properties ->General->Use of MFC ->Use MFC in a Shared DLL

    2、在stdafx.h头文件中添加一下内容:

    #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
    #ifndef VC_EXTRALEAN
    #define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
    #endif
    #include <afx.h>
    #include <afxwin.h>         // MFC core and standard components
    #include <afxext.h>         // MFC extensions
    #ifndef _AFX_NO_OLE_SUPPORT
    #include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
    #endif
    #ifndef _AFX_NO_AFXCMN_SUPPORT
    #include <afxcmn.h>                     // MFC support for Windows Common Controls
    #endif // _AFX_NO_AFXCMN_SUPPORT

     

  • 相关阅读:
    使用Mysql慢查询日志对有效率问题的SQL进行监控
    wampserver3.1.0安装及配置
    Composer
    HTML5 本地存储(Web Storage)
    HTML5 元素拖动
    生成验证码
    git 基础命令
    POI使用流程
    JDK各版本新特性总结
    dubbo+zookeeper项目搭建
  • 原文地址:https://www.cnblogs.com/cmranger/p/4077626.html
Copyright © 2011-2022 走看看