Mercurial > mm7
view OSAPI.cpp @ 2229:10c909eb6766
dword_AE336C to NPCStats::dword_AE336C_LastMispronouncedNameFirstLetter,
dword_AE3370 to NPCStats::dword_AE3370_LastMispronouncedNameResult
sub_495366 to NPCStats::sub_495366_MispronounceName + cleanup
author | Grumpy7 |
---|---|
date | Sat, 22 Feb 2014 18:25:18 +0100 |
parents | d44b7775fc06 |
children | aff7a7b072b7 |
line wrap: on
line source
#include "OSAPI.h" #include "OSInfo.h" #include "Log.h" bool OSInfo::initialized = false; OSVERSIONINFOA OSInfo::info; //----- (00462C94) -------------------------------------------------------- int __stdcall wWinMain(HINSTANCE hInstance, HINSTANCE, wchar_t *lpCmdLine, int nShowCmd) { Log::Initialize(); //if (HWND hMM7Window = FindWindowW(L"MM7", 0)) if (HWND hMM7Window = FindWindowW(L"M&MTrilogy", 0)) { if (IsIconic(hMM7Window)) ShowWindow(hMM7Window, SW_RESTORE); SetForegroundWindow(GetLastActivePopup(hMM7Window)); return 0; } HWND hPrevWindow = GetActiveWindow(); { Log::Warning(L"OS init: ok"); extern bool MM_Main(const wchar_t *pCmdLine); MM_Main(lpCmdLine); } if (hPrevWindow) SetActiveWindow(hPrevWindow); return GetLastError(); } void MsgBox(const wchar_t *msg, const wchar_t *title) { MessageBoxW(nullptr, msg, title, 0); }