C# GUI for C++
So many times I thought: "I would really like to have a C# GUI for this project, but I have to use C++."
This is a library that allows a program to run a separate C# application (side bar) to handles all the GUI, and communicate changes to the C++ app. It's helpful for demos (such as my NPR demo), in which parameters are clearly defined.
The programmer passes a pointer to each of his application's parameters (variables) to the sidebar code, and that variable shows up in the sidebar, ready to edit. Pass in a float, and it shows up as a slider (the allowed range can be specified). Pass in a color, and it creates R/G/B sliders and a color picker box. And so on... If one needs to know exactly when a parameter changes, an optional callback can be passed, which will be called right after that variable was changed. Of course everything is protected by semaphores.
The sidebar is a separate application altogether, and underlying this is essentially inter-process communication, using Windows Pipes. They works just like sockets (create, send, listen), so essentially it feels like networking, only it's offline.
I may put the source code online, if anyone is interested.
Website copyright (c) 2004-2007 Marc ten Bosch, all rights reserved.
Some project and game content copyright (c) 2005 DigiPen (USA) Corporation, all rights reserved.