-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathlitebrowser.cpp
More file actions
52 lines (39 loc) · 1.03 KB
/
litebrowser.cpp
File metadata and controls
52 lines (39 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include "globals.h"
#include "litebrowser.h"
#include "BrowserWnd.h"
#include "..\containers\cairo\cairo_font.h"
#pragma comment( lib, "gdiplus.lib" )
#pragma comment( lib, "shlwapi.lib" )
using namespace Gdiplus;
CRITICAL_SECTION cairo_font::m_sync;
int APIENTRY _tWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow)
{
CoInitialize(NULL);
InitCommonControls();
InitializeCriticalSectionAndSpinCount(&cairo_font::m_sync, 1000);
GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
{
CBrowserWnd wnd(hInstance);
wnd.create();
if(lpCmdLine && lpCmdLine[0])
{
wnd.open(lpCmdLine);
} else
{
wnd.open(L"https://dmoz-odp.org/");
}
MSG msg;
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
GdiplusShutdown(gdiplusToken);
return 0;
}