Tue, 27 Jan 2015 09:59:32 +0100
added event handler for menus (WPF)
// UIwrapper.h #pragma once using namespace System; using namespace System::Runtime::InteropServices; using namespace System::Threading; using namespace System::Windows; using namespace System::Windows::Controls; #define UI_EXPORT extern "C" __declspec(dllexport) extern "C" typedef void(*UIcallback)(void*, void*); void* ObjectToPtr(Object ^obj); public ref class EventWrapper { UIcallback callback = NULL; void *userdata = NULL; Action<IntPtr> ^action; public: EventWrapper(UIcallback callback, void *userdata); Action<IntPtr>^ GetAction(); void Callback(IntPtr uiobj); };