diff -r 0cdb8089a29f -r a38aec91bd66 ui/wpf/UIwrapper/UIwrapper/controls.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/wpf/UIwrapper/UIwrapper/controls.cpp Sat Jan 31 11:51:54 2015 +0100 @@ -0,0 +1,18 @@ + + +#include "stdafx.h" +#include + +#include "controls.h" + +#using "UIcore.dll" + +UI_EXPORT void* __stdcall UIbutton(gcroot *container, char *label, UIcallback f, void *eventdata) { + gcroot *button = new gcroot(); + + EventWrapper ^evt = gcnew EventWrapper(f, eventdata); + RoutedEventHandler ^handler = gcnew RoutedEventHandler(evt, &EventWrapper::Callback); + + *button = UI::Controls::Button(*container, gcnew String(label), handler); + return button; +} \ No newline at end of file