Example of binding integration for video CreateWindow. It's how I think to do the binding. I think it's near what you want to do.
Tell me if you have some remarks