2 * PROJECT: ReactOS VGA Font Editor
3 * LICENSE: GNU General Public License Version 2.0 or any later version
4 * FILE: devutils/vgafontedit/main.c
5 * PURPOSE: Main entry point of the application
6 * COPYRIGHT: Copyright 2008 Colin Finck <mail@colinfinck.de>
11 static const WCHAR szCharacterClipboardFormat
[] = L
"RosVgaFontChar";
16 UINT uCharacterClipboardFormat
;
19 wWinMain(HINSTANCE hInst
, HINSTANCE hPrevInstance
, LPWSTR lpCmdLine
, int nCmdShow
)
24 PMAIN_WND_INFO Info
= 0;
26 UNREFERENCED_PARAMETER(hPrevInstance
);
27 UNREFERENCED_PARAMETER(lpCmdLine
);
30 hProcessHeap
= GetProcessHeap();
32 AllocAndLoadString(&szAppName
, IDS_APPTITLE
);
34 hAccel
= LoadAcceleratorsW( hInstance
, MAKEINTRESOURCEW(IDA_MAINACCELERATORS
) );
36 uCharacterClipboardFormat
= RegisterClipboardFormatW(szCharacterClipboardFormat
);
37 if(!uCharacterClipboardFormat
)
40 if( InitMainWndClass() && InitFontWndClass() && InitFontBoxesWndClass() && InitEditGlyphWndClasses() )
42 if( CreateMainWindow(nCmdShow
, &Info
) )
44 while( GetMessageW(&msg
, NULL
, 0, 0) )
46 if( !TranslateMDISysAccel(Info
->hMdiClient
, &msg
) &&
47 !TranslateAccelerator(Info
->hMainWnd
, hAccel
, &msg
) )
49 TranslateMessage(&msg
);
50 DispatchMessage(&msg
);
58 HeapFree(hProcessHeap
, 0, szAppName
);
60 // Just unregister our window classes, don't care whether they were created or not
61 UnInitEditGlyphWndClasses();
62 UnInitFontBoxesWndClass();