I would suggest that you look at the different node that are avaible on this topic and learn the C++ from their source code.
You can use the Widget...