Windows常见宏的使用
生活随笔
收集整理的這篇文章主要介紹了
Windows常见宏的使用
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
WIN32_LEAN_AND_MEAN
1.? 參考資料:https://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
2.? 使用說明:
?????? You can reduce the size of the Windows header files by excluding some of the less common API declarations as follows:
?????? ? Define?WIN32_LEAN_AND_MEAN?to exclude APIs such as Cryptography, DDE, RPC, Shell, and Windows Sockets.
?????? 通常我們在開發(fā)windows程序的時(shí)候,貪圖省事會(huì)直接包含"windows.h"頭文件,但是其實(shí)該頭文件中很多的API是不需要使用到的。可以定義WIN32_LEAN_AND_MEAN宏來減小windows包含頭的大小:
#ifdef _WINDOWS_ // windows#define WIN32_LEAN_AND_MEAN #include <windows.h> #undef WIN32_LEAN_AND_MEAN #else // linux#endif?
轉(zhuǎn)載于:https://www.cnblogs.com/heartchord/p/4479889.html
總結(jié)
以上是生活随笔為你收集整理的Windows常见宏的使用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c#解析json
- 下一篇: Windows Form -----内容