ui/wpf/UIwrapper/UIwrapper/window.cpp

Wed, 30 Oct 2024 10:14:47 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 30 Oct 2024 10:14:47 +0100
branch
newapi
changeset 372
4657ec1229f2
parent 135
b9dc9cdfa23a
permissions
-rw-r--r--

fix incorrect UiVar destruction

78
135920fe441b added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1
135920fe441b added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2
135920fe441b added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 #include "stdafx.h"
135920fe441b added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
4 #include <stdio.h>
135920fe441b added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5
135920fe441b added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
6 #include "window.h"
135920fe441b added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
7
135920fe441b added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
8 #using "UIcore.dll"
135920fe441b added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
9
83
a38aec91bd66 added box layout and button (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 82
diff changeset
10 UI_EXPORT void* __stdcall UIwindow(char *title, void *uiobj) {
135
b9dc9cdfa23a refactors architecture (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 83
diff changeset
11 UI::MainWindow ^window = gcnew UI::MainWindow(gcnew String(title), IntPtr(uiobj));
83
a38aec91bd66 added box layout and button (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 82
diff changeset
12 gcroot<UI::MainWindow^> *ptr = new gcroot<UI::MainWindow^>();
a38aec91bd66 added box layout and button (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 82
diff changeset
13 *ptr = window;
a38aec91bd66 added box layout and button (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 82
diff changeset
14 return ptr;
78
135920fe441b added initial WPF code
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
15 }
83
a38aec91bd66 added box layout and button (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 82
diff changeset
16
a38aec91bd66 added box layout and button (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 82
diff changeset
17

mercurial