mirror of
https://github.com/reactos/reactos.git
synced 2024-11-05 14:19:25 +00:00
a9b1e059f4
* Just rename the 4 new files. Absolutely no other change. * CMakeLists.txt, adapt the filenames * Adapt all includes to make it compile * CApplicationDB->CAppDB * CApplicationInfo->CAppInfo * Follow Mark Jansens good example and antipad the headers
60 lines
1.6 KiB
C++
60 lines
1.6 KiB
C++
/*
|
|
* PROJECT: ReactOS Applications Manager
|
|
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
|
* PURPOSE: Main program
|
|
* COPYRIGHT: Copyright 2009 Dmitry Chapyshev (dmitry@reactos.org)
|
|
* Copyright 2015 Ismael Ferreras Morezuelas (swyterzone+ros@gmail.com)
|
|
* Copyright 2017 Alexander Shaposhnikov (sanchaez@reactos.org)
|
|
*/
|
|
#include "rapps.h"
|
|
#include "unattended.h"
|
|
#include "winmain.h"
|
|
#include <atlcom.h>
|
|
#include <gdiplus.h>
|
|
#include <conutils.h>
|
|
|
|
LPCWSTR szWindowClass = L"ROSAPPMGR2";
|
|
|
|
HWND hMainWnd;
|
|
HINSTANCE hInst;
|
|
SETTINGS_INFO SettingsInfo;
|
|
|
|
BEGIN_OBJECT_MAP(ObjectMap)
|
|
END_OBJECT_MAP()
|
|
|
|
CComModule gModule;
|
|
CAtlWinModule gWinModule;
|
|
|
|
INT WINAPI
|
|
wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, INT nShowCmd)
|
|
{
|
|
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
|
|
ULONG_PTR gdiplusToken;
|
|
|
|
gModule.Init(ObjectMap, hInstance, NULL);
|
|
Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
|
|
|
|
if (GetUserDefaultUILanguage() == MAKELANGID(LANG_HEBREW, SUBLANG_DEFAULT))
|
|
{
|
|
SetProcessDefaultLayout(LAYOUT_RTL);
|
|
}
|
|
|
|
hInst = hInstance;
|
|
|
|
BOOL bIsFirstLaunch = !LoadSettings(&SettingsInfo);
|
|
if (bIsFirstLaunch)
|
|
{
|
|
FillDefaultSettings(&SettingsInfo);
|
|
}
|
|
|
|
InitLogs();
|
|
InitCommonControls();
|
|
|
|
// parse cmd-line and perform the corresponding operation
|
|
BOOL bSuccess = ParseCmdAndExecute(GetCommandLineW(), bIsFirstLaunch, SW_SHOWNORMAL);
|
|
|
|
Gdiplus::GdiplusShutdown(gdiplusToken);
|
|
gModule.Term();
|
|
|
|
return bSuccess ? 0 : 1;
|
|
}
|