-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathcppieembed.cpp
45 lines (37 loc) · 1001 Bytes
/
cppieembed.cpp
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
#define STRICT
#define NOCRYPT
#include "webform.h"
#include "webwindow.h"
#include "webformdispatchimpl.h"
#include "jsobject.h"
#include <windows.h>
#include <tchar.h>
#include <map>
#include <string>
#include <sstream>
#include <cctype>
#include <algorithm>
bool loaded;
WebWindow* webWindow;
JSObject *jsobj;
WebformDispatchImpl *webformDispatchImpl;
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
OleInitialize(0);
jsobj = new JSObject();
jsobj->AddRef();
webformDispatchImpl = new WebformDispatchImpl(jsobj);
webWindow = new WebWindow(webformDispatchImpl);
webWindow->Create(hInstance, 200, 100, 400, 400, true);
webWindow->webForm->Go("http://localhost/lionwiki");
MSG msg;
while (GetMessage(&msg, NULL, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
delete webWindow;
delete webformDispatchImpl;
jsobj->Release();
OleUninitialize();
return (int)msg.wParam;
}