annotate OSAPI.cpp @ 2078:66cbc97b31fa

fix transparent fonts
author Gloval
date Wed, 04 Dec 2013 23:35:44 +0400
parents f9698295c0bd
children d44b7775fc06
rev   line source
0
Ritor1
parents:
diff changeset
1 #include "OSAPI.h"
Ritor1
parents:
diff changeset
2 #include "OSInfo.h"
Ritor1
parents:
diff changeset
3 #include "Log.h"
Ritor1
parents:
diff changeset
4
Ritor1
parents:
diff changeset
5
Ritor1
parents:
diff changeset
6 OSVersion *pVersion = nullptr;
Ritor1
parents:
diff changeset
7
Ritor1
parents:
diff changeset
8
1926
3eb0c4f3d899 Woops, debug stuff.
Nomad
parents: 1924
diff changeset
9
1038
39f42990698f Cleanings
Nomad
parents: 28
diff changeset
10
0
Ritor1
parents:
diff changeset
11 //----- (00462C94) --------------------------------------------------------
Ritor1
parents:
diff changeset
12 int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE, wchar_t *lpCmdLine, int nShowCmd)
Ritor1
parents:
diff changeset
13 {
Ritor1
parents:
diff changeset
14 Log::Initialize();
Ritor1
parents:
diff changeset
15
Ritor1
parents:
diff changeset
16 //if (HWND hMM7Window = FindWindowW(L"MM7", 0))
Ritor1
parents:
diff changeset
17 if (HWND hMM7Window = FindWindowW(L"M&MTrilogy", 0))
Ritor1
parents:
diff changeset
18 {
Ritor1
parents:
diff changeset
19 if (IsIconic(hMM7Window))
Ritor1
parents:
diff changeset
20 ShowWindow(hMM7Window, SW_RESTORE);
Ritor1
parents:
diff changeset
21 SetForegroundWindow(GetLastActivePopup(hMM7Window));
Ritor1
parents:
diff changeset
22 return 0;
Ritor1
parents:
diff changeset
23 }
Ritor1
parents:
diff changeset
24 HWND hPrevWindow = GetActiveWindow();
Ritor1
parents:
diff changeset
25
Ritor1
parents:
diff changeset
26 pVersion = new OSVersion;
Ritor1
parents:
diff changeset
27 {
2059
f9698295c0bd AttackerInfo, MerchandiseTest
Ritor1
parents: 1926
diff changeset
28
0
Ritor1
parents:
diff changeset
29 Log::Warning(L"OS init: ok");
Ritor1
parents:
diff changeset
30
Ritor1
parents:
diff changeset
31 extern bool MM_Main(const wchar_t *pCmdLine);
Ritor1
parents:
diff changeset
32 MM_Main(lpCmdLine);
Ritor1
parents:
diff changeset
33 }
Ritor1
parents:
diff changeset
34 delete pVersion;
Ritor1
parents:
diff changeset
35 pVersion = nullptr;
Ritor1
parents:
diff changeset
36
Ritor1
parents:
diff changeset
37 if (hPrevWindow)
Ritor1
parents:
diff changeset
38 SetActiveWindow(hPrevWindow);
Ritor1
parents:
diff changeset
39
28
739d8f3b50f9 ReleaseSoundData fix
zipi@zipi-PC
parents: 0
diff changeset
40 //__debugbreak();
0
Ritor1
parents:
diff changeset
41 return 0;
Ritor1
parents:
diff changeset
42 }
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
43
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
44
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
45
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
46
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
47 void MsgBox(const wchar_t *msg, const wchar_t *title)
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
48 {
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
49 MessageBoxW(nullptr, msg, title, 0);
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1038
diff changeset
50 }