I would create a WINDEV library, xxxx.WDL. That´s pretty easy. The tricky part is to implement a plugin framework around LoadWDL(). Without thinking too much, I would use XML- Plugin description, f:i. window name, p0arameter etc.
ControlClone - visual representation of your plugin. f.i. a new button in your toolbar
that's it
Bjoern