-
Notifications
You must be signed in to change notification settings - Fork 20
/
Main.h
73 lines (59 loc) · 1.77 KB
/
Main.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
70
71
72
73
#pragma once
#ifndef _MAIN_H_
#define _MAIN_H_
#include <Windows.h>
#include <windowsx.h>
#include <CommCtrl.h>
#include <Uxtheme.h>
#include "Helper.h"
#include "Tree.h"
#include "MetaFile.h"
#include "PazFile.h"
#include "Setting.h"
#pragma comment(lib, "comctl32.lib")
#pragma comment(lib, "uxtheme.lib")
#pragma comment(linker,"\"/manifestdependency:type='win32' \
name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \
processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#define WINDOW_MIN_WIDTH 1000
#define WINDOW_MIN_HEIGHT 700
#define DIVIDE_RATIO 0.7f
#define STATUSBAR_SECTION_COUNT 3
#define STATUSBAR_SECTION1 70
#define STATUSBAR_SECTION2 530
#define BUTTON_WIDTH 50
#define BUTTON_HEIGHT 25
#define FONT_SIZE 17
#define FONT_FACE L"Segoe UI"
#define ID_BUTTON_OPEN 0
#define ID_BUTTON_EXTRACT 1
#define ID_TREE_FILESYSTEM 10
#define ID_STATIC 11
#define ID_STATUSBAR 20
#define ICE_KEY ((uint8_t *)"\x51\xF3\x0F\x11\x04\x24\x6A\x00")
#define ICE_KEY_LEN 8
#define SAFE_DELETE(ptr) { if (ptr) { delete ptr; ptr = NULL; } }
#define SAFE_FREE(ptr) { if (ptr) { free(ptr); ptr = NULL; } }
typedef struct _AppData {
HWND hButtonOpen;
HWND hButtonExctact;
HWND hTreeFileSystem;
HWND hStatusBar;
HWND hStaticInfo;
HWND hProgressBar;
kukdh1::Tree *CTree;
kukdh1::Meta *CMeta;
kukdh1::Setting CSetting;
WCHAR *wpszFolderPath;
HFONT hFont;
_AppData() :
CTree(NULL),
CMeta(NULL),
wpszFolderPath(NULL) {}
~_AppData() {
SAFE_DELETE(CTree);
SAFE_DELETE(CMeta);
SAFE_FREE(wpszFolderPath);
}
} AppData;
#endif