Remove Windows.h in tutorials

This commit is contained in:
vczh
2021-10-19 02:42:30 -07:00
parent f1596a7f06
commit 0e3446a22f
8 changed files with 8 additions and 6 deletions
@@ -1,6 +1,5 @@
#define GAC_HEADER_USE_NAMESPACE #define GAC_HEADER_USE_NAMESPACE
#include "UI/Source/Demo.h" #include "UI/Source/Demo.h"
#include <Windows.h>
using namespace vl::collections; using namespace vl::collections;
using namespace vl::stream; using namespace vl::stream;
@@ -1,6 +1,8 @@
#define GAC_HEADER_USE_NAMESPACE #define GAC_HEADER_USE_NAMESPACE
#include "UI/Source/Demo.h" #include "UI/Source/Demo.h"
#ifdef VCZH_MSVC
#include <Windows.h> #include <Windows.h>
#endif
using namespace vl::collections; using namespace vl::collections;
using namespace vl::stream; using namespace vl::stream;
@@ -24,7 +26,9 @@ OpenUrl
void OpenUrl(const WString& url) void OpenUrl(const WString& url)
{ {
#ifdef VCZH_MSVC
ShellExecute(NULL, L"OPEN", url.Buffer(), NULL, NULL, SW_MAXIMIZE); ShellExecute(NULL, L"OPEN", url.Buffer(), NULL, NULL, SW_MAXIMIZE);
#endif
} }
/*********************************************************************** /***********************************************************************
@@ -1,6 +1,5 @@
#define GAC_HEADER_USE_NAMESPACE #define GAC_HEADER_USE_NAMESPACE
#include "UI/Source/Demo.h" #include "UI/Source/Demo.h"
#include <Windows.h>
using namespace vl::collections; using namespace vl::collections;
using namespace vl::stream; using namespace vl::stream;
@@ -1,6 +1,5 @@
#define GAC_HEADER_USE_NAMESPACE #define GAC_HEADER_USE_NAMESPACE
#include "UI/Source/Demo.h" #include "UI/Source/Demo.h"
#include <Windows.h>
using namespace vl::collections; using namespace vl::collections;
using namespace vl::stream; using namespace vl::stream;
@@ -1,6 +1,5 @@
#define GAC_HEADER_USE_NAMESPACE #define GAC_HEADER_USE_NAMESPACE
#include "UI/Source/Demo.h" #include "UI/Source/Demo.h"
#include <Windows.h>
using namespace vl::collections; using namespace vl::collections;
using namespace vl::stream; using namespace vl::stream;
@@ -1,6 +1,5 @@
#define GAC_HEADER_USE_NAMESPACE #define GAC_HEADER_USE_NAMESPACE
#include "UI/Source/Demo.h" #include "UI/Source/Demo.h"
#include <Windows.h>
using namespace vl::collections; using namespace vl::collections;
using namespace vl::stream; using namespace vl::stream;
@@ -1,6 +1,8 @@
#define GAC_HEADER_USE_NAMESPACE #define GAC_HEADER_USE_NAMESPACE
#include "UI/Source/Demo.h" #include "UI/Source/Demo.h"
#ifdef VCZH_MSVC
#include <Windows.h> #include <Windows.h>
#endif
using namespace vl::collections; using namespace vl::collections;
using namespace vl::stream; using namespace vl::stream;
@@ -10,7 +12,9 @@ class ViewModel : public Object, public virtual demo::IViewModel
public: public:
void OpenUrl(const WString& url)override void OpenUrl(const WString& url)override
{ {
#ifdef VCZH_MSVC
ShellExecute(NULL, L"OPEN", url.Buffer(), NULL, NULL, SW_MAXIMIZE); ShellExecute(NULL, L"OPEN", url.Buffer(), NULL, NULL, SW_MAXIMIZE);
#endif
} }
}; };
@@ -1,6 +1,5 @@
#define GAC_HEADER_USE_NAMESPACE #define GAC_HEADER_USE_NAMESPACE
#include "UI/Source/Demo.h" #include "UI/Source/Demo.h"
#include <Windows.h>
using namespace vl::collections; using namespace vl::collections;
using namespace vl::stream; using namespace vl::stream;