|
1 |
|
2 |
|
3 #include "stdafx.h" |
|
4 #include <stdio.h> |
|
5 |
|
6 #include "controls.h" |
|
7 |
|
8 #using "UIcore.dll" |
|
9 |
|
10 UI_EXPORT void* __stdcall UIbutton(gcroot<UI::Container^> *container, char *label, UIcallback f, void *eventdata) { |
|
11 gcroot<Button^> *button = new gcroot<Button^>(); |
|
12 |
|
13 EventWrapper ^evt = gcnew EventWrapper(f, eventdata); |
|
14 RoutedEventHandler ^handler = gcnew RoutedEventHandler(evt, &EventWrapper::Callback); |
|
15 |
|
16 *button = UI::Controls::Button(*container, gcnew String(label), handler); |
|
17 return button; |
|
18 } |