-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon.h
More file actions
55 lines (44 loc) · 997 Bytes
/
common.h
File metadata and controls
55 lines (44 loc) · 997 Bytes
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
#pragma once
#ifndef COMMON_H_
#define COMMON_H_
#include <iostream>
#include <sstream>
#include <string>
#include "framework.h"
#include "resource.h"
// Easier line endings
#ifndef ENDL
#define ENDL std::endl
#endif // ENDL
#ifndef NL
// Newline
#define NL "\n"
// "wide" newline
#define WNL L"\n"
#endif // ENDL
// Maximum .res loadstring length
#ifndef MAX_LOADSTRING
#define MAX_LOADSTRING MAX_PATH // Traditionally 255
#endif // MAX_LOADSTRING
// Exit code defines
#ifndef SUCCESS_CODE
#define SUCCESS_CODE 0
#endif
#ifndef ERROR_CODE
#define ERROR_CODE 1
#endif
// Return codes
#if !defined(SUCC)
static constexpr int SUCC = SUCCESS_CODE;
#endif // !defined(SUCC)
#if !defined(FAIL)
static constexpr int FAIL = ERROR_CODE;
#endif // !defined(FAIL)
// Functions to get main and child window handles from other code
extern HWND getMainHwnd();
extern HWND getChildHwnd();
// Other common functions
namespace common {
std::wstring getVersionString();
};
#endif // COMMON_H_