forked from yinhui1129754/CppFishingCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathd2dWin32.cpp
More file actions
49 lines (42 loc) · 1.2 KB
/
Copy pathd2dWin32.cpp
File metadata and controls
49 lines (42 loc) · 1.2 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
// d2dWin32.cpp : 定义应用程序的入口点。
//
#include "../stdafx.h"
#include "d2dWin32.h"
//#include "frame0.h"
void frame1(DemoApp*);
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// Use HeapSetInformation to specify that the process should
// terminate if the heap manager detects an error in any heap used
// by the process.
// The return value is ignored, because we want to continue running in the
// unlikely event that HeapSetInformation fails.
HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
if (SUCCEEDED(CoInitialize(NULL)))
{
{
DemoApp app;
app.addFun(frame1);
if (SUCCEEDED(app.Initialize()))
{
app.RunMessageLoop();
}
}
CoUninitialize();
}
return 0;
}
void frame1(DemoApp *app) {
if (!(app)->sceneArr.empty()) {
(app)->sceneArr[(app)->nowScene]->render(&app);
}
/*unsigned int len = frame0::p1.size();
for (unsigned int i = 0;i < len;i++) {
(app)->content->drawArc(frame0::p1[i].x, frame0::p1[i].y, 10, 10);
}*/
}