#include <Windows.h>
#define WIN32_LEAN_AND_MEAN
Run Code Online (Sandbox Code Playgroud)
为什么上面的代码语句有错误?是顺序错误还是其他?
小智 6
在 Windows.h 头文件中,如果未定义 WIN32_LEAN_AND_MEAN,预处理器将包含其他头文件。所以如果你不想包含这些标题,你必须在 #include 之前定义 WIN32_LEAN_AND_MEAN ,否则它不会有任何影响
#ifndef WIN32_LEAN_AND_MEAN
#include <cderr.h>
#include <dde.h>
#include <ddeml.h>
#include <dlgs.h>
#ifndef _MAC
#include <lzexpand.h>
#include <mmsystem.h>
#include <nb30.h>
#include <rpc.h>
#endif
#include <shellapi.h>
#ifndef _MAC
#include <winperf.h>
#include <winsock.h>
#endif
#ifndef NOCRYPT
#include <wincrypt.h>
#include <winefs.h>
#include <winscard.h>
#endif
#ifndef NOGDI
#ifndef _MAC
#include <winspool.h>
#ifdef INC_OLE1
#include <ole.h>
#else
#include <ole2.h>
#endif /* !INC_OLE1 */
#endif /* !MAC */
#include <commdlg.h>
#endif /* !NOGDI */
#endif /* WIN32_LEAN_AND_MEAN */
Run Code Online (Sandbox Code Playgroud)
直接从 Windows.h
| 归档时间: |
|
| 查看次数: |
3395 次 |
| 最近记录: |