當前位置:
首頁 >
Windows常见宏的使用
發布時間:2024/8/24
62
豆豆
生活随笔
收集整理的這篇文章主要介紹了
Windows常见宏的使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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.
?????? 通常我們在開發windows程序的時候,貪圖省事會直接包含"windows.h"頭文件,但是其實該頭文件中很多的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?
轉載于:https://www.cnblogs.com/heartchord/p/4479889.html
總結
以上是生活随笔為你收集整理的Windows常见宏的使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: c#解析json
- 下一篇: Windows Form -----内容