-
Notifications
You must be signed in to change notification settings - Fork 0
/
stdafx.h
69 lines (60 loc) · 1.8 KB
/
stdafx.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once
#ifndef _DEBUG
#define _SECURE_SCL 0
#endif
#define WIN32_LEAN_AND_MEAN
#define _WIN32_WINDOWS 0x0500
#define _WIN32_WINNT 0x0501
#define _WIN32_IE 0x0501
#include <windows.h>
#include <windowsx.h>
#include <shtypes.h>
#include <malloc.h>
#include <crtdbg.h>
#include <olectl.h>
#include <shlwapi.h>
#include <shlobj.h>
#include <shlguid.h>
#include <shellapi.h>
//#include <commctrl.h>
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
#include <atlbase.h>
#include <atlstr.h>
#pragma warning( push )
#pragma warning( disable : 4838 ) // conversion from 'int' to 'UINT' requires a narrowing conversion
#pragma warning( disable : 4996 ) // 'sprintf' was declared deprecated
#pragma warning( disable : 4302 ) // 'type cast': truncation from 'LPCWSTR' to 'WORD'
#include "..\..\wtl\atlapp.h"
#pragma warning( pop )
#include <atlwin.h>
#include "..\..\wtl\atlctrls.h"
#ifdef _DEBUG
#define VERIFY(f) _ASSERTE(f)
#else
#define VERIFY(f) ((void)(f))
#endif
#pragma warning( push )
#pragma warning( disable : 4995 ) // 'function': name was marked as #pragma deprecated
#pragma warning( disable : 4244 ) // 'argument' : conversion from '__w64 unsigned int' to 'rsize_t', possible loss of data
#include <strsafe.h>
#include <vector>
#pragma warning( pop )
using namespace std;
#ifdef _DEBUG
#define TRACE AfxTrace
inline void __cdecl AfxTrace(LPCWSTR lpszFormat, ...)
{
int nBuf;
WCHAR szBuffer[512];
va_list args;
va_start(args, lpszFormat);
nBuf = StringCchVPrintf( szBuffer, _countof( szBuffer ), lpszFormat, args );
_ASSERTE(nBuf < _countof(szBuffer));
OutputDebugString( szBuffer );
va_end(args);
}
#define UNUSED(x) __noop
#else
#define TRACE __noop // (void(0))
#define UNUSED(x) x
#endif