reactos/rosapps/applications/devutils/vgafontedit/main.c
Colin Finck 57d74df773 [VGAFONTEDIT] Use the new header with SPDX license identifier and make the entire application GPL-2.0+
The code of the single GPL-2.0 only file "misc.c" was originally derived from GPL-2.0 only devmgmt.
I have now replaced it with the same code from LGPL-2.1+ mmc, which makes my application a full GPL-2.0+ work. This is legit, because I know that Thomas Weidenmueller is the original author of the "misc.c" code.

svn path=/trunk/; revision=75987
2017-09-29 13:58:14 +00:00

66 lines
1.8 KiB
C

/*
* PROJECT: ReactOS VGA Font Editor
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
* PURPOSE: Main entry point of the application
* COPYRIGHT: Copyright 2008 Colin Finck (colin@reactos.org)
*/
#include "precomp.h"
static const WCHAR szCharacterClipboardFormat[] = L"RosVgaFontChar";
HINSTANCE hInstance;
HANDLE hProcessHeap;
PWSTR szAppName;
UINT uCharacterClipboardFormat;
INT WINAPI
wWinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
{
HACCEL hAccel;
INT nRet = 1;
MSG msg;
PMAIN_WND_INFO Info = 0;
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
hInstance = hInst;
hProcessHeap = GetProcessHeap();
AllocAndLoadString(&szAppName, IDS_APPTITLE);
hAccel = LoadAcceleratorsW( hInstance, MAKEINTRESOURCEW(IDA_MAINACCELERATORS) );
uCharacterClipboardFormat = RegisterClipboardFormatW(szCharacterClipboardFormat);
if(!uCharacterClipboardFormat)
return 1;
if( InitMainWndClass() && InitFontWndClass() && InitFontBoxesWndClass() && InitEditGlyphWndClasses() )
{
if( CreateMainWindow(nCmdShow, &Info) )
{
while( GetMessageW(&msg, NULL, 0, 0) )
{
if( !TranslateMDISysAccel(Info->hMdiClient, &msg) &&
!TranslateAccelerator(Info->hMainWnd, hAccel, &msg) )
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
nRet = 0;
}
}
HeapFree(hProcessHeap, 0, szAppName);
// Just unregister our window classes, don't care whether they were created or not
UnInitEditGlyphWndClasses();
UnInitFontBoxesWndClass();
UnInitFontWndClass();
UnInitMainWndClass();
return nRet;
}