-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
36 lines (32 loc) · 860 Bytes
/
main.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
#include <windows.h>
#include <commctrl.h>
#include <locale.h>
#include "resource.h"
#include "math.hpp"
#include "dwtl.hpp"
#include "trayicon.hpp"
#include "properties.hpp"
#include "mru.hpp"
#include "logfile.hpp"
#include "file.hpp"
#include "export.hpp"
#include "today.hpp"
#include "uurclone.hpp"
int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
UURClone uurc;
HANDLE mtx = ::CreateMutex(NULL, TRUE, "UUR Mutex");
if (mtx != NULL && ::GetLastError()!=ERROR_ALREADY_EXISTS)
{
INITCOMMONCONTROLSEX x;
x.dwSize = sizeof(INITCOMMONCONTROLSEX);
x.dwICC = ICC_LISTVIEW_CLASSES;
::InitCommonControlsEx(&x);
return uurc.DoModal();
}
else
{
::MessageBox(NULL, "Only one instance at a time please!", "Error while starting UUR", MB_OK | MB_ICONERROR);
}
return 1;
}