-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathApplication.cpp
69 lines (48 loc) · 1.24 KB
/
Application.cpp
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
/**
* ______________________________________________________
* This file is part of ko-ascension-launcher project.
*
* @author Mustafa Kemal Gılor <[email protected]> (2015)
* .
* SPDX-License-Identifier: MIT
* ______________________________________________________
*/
#include "stdafx.h"
#include "Application.h"
#include "MainWindowTranslucent.h"
#include "LogWriter.h"
// CTranslucentApp
BEGIN_MESSAGE_MAP(CTranslucentApp, CWinApp)
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
// CTranslucentApp ����
CTranslucentApp::CTranslucentApp()
{
}
CTranslucentApp theApp;
ULONG_PTR gdiplusToken;
BOOL CTranslucentApp::InitInstance()
{
CWinApp::InitInstance();
AfxEnableControlContainer();
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
CreateDirectory(L"logs", NULL);
CLogWriter::prepare();
CLogWriter::Log->info("Updater started");
CMainWindowTranslucent dlg(IDB_BACKGROUND);
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
return FALSE;
}
int CTranslucentApp::ExitInstance()
{
Gdiplus::GdiplusShutdown(gdiplusToken);
return CWinApp::ExitInstance();
}