Unify Windows.h inclusion

Windows.h must be included first and must be included with care
regarding WinSock.h and WinSock2.h affair.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
Simon Rozman 2021-11-15 11:34:07 +01:00
parent 13cd778359
commit 22acac44f1
2 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,6 @@
#include <wx/string.h> #include <wx/string.h>
#pragma warning(pop) #pragma warning(pop)
#include <Windows.h>
#include <Windowsx.h> #include <Windowsx.h>
#include <shellapi.h> #include <shellapi.h>
#include <ShlObj.h> #include <ShlObj.h>

View File

@ -42,6 +42,7 @@
#if !defined(RC_INVOKED) && !defined(MIDL_PASS) #if !defined(RC_INVOKED) && !defined(MIDL_PASS)
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h.
#include <Windows.h> #include <Windows.h>
#include <codeanalysis\warnings.h> #include <codeanalysis\warnings.h>