Well. Seems like I did it.
Thanks you for agreeing to help me from the beginning. Also thanks for this project and its heading.
I will leave instruction on how I did it:
Required knowledge: windows command line commands (simple) and PATH variable editing
Install GitHub Desktop
Add C:\Users\*Your UserName*\AppData\Local\GitHubDesktop\app-1.5.1\resources\app\git\cmd to PATH
Copy files from msys/bin (bash.exe is in it) and move them to C:\Users\Spar\AppData\Local\GitHubDesktop\app-1.5.1\resources\app\git\usr\bin
Install MINGW 32-bit or MINGW 64-bit respectively.
Add *path to mingw*/bin to PATH
Win + R. Type cmd to open console
Type cd /
Type git clone https://github.com/capr/multigit luapower
Type cd luapower and mgit clone https://github.com/luapower/luapower-repos
Type mgit clone-all and wait
See bundle commands list. Test that everything is working: mgit bundle -o fat.exe
The window's WNDPROC is bound to MessageRouter.proc which calls the window's __handle_message() method which calls the WM_PAINT() method or the on_paint() method. If you're using CairoPanel, that descends from BitmapPanel which defines the on_paint() method. Hope this helps.
Although you already declined, I must bring back wxlua.
There is a fine and well maintained github repo at https://github.com/pkulchenko/wxlua (for Win/Linux/OS-X).
I'm using it as it is bundled with ZeroBrane Studio. The wx binding from ZBS plays well together with bin/mingw32/luajit.exe, but with bin/mingw64/luajit.exe I get errors (wx.dll is no valid win32 application). So I'd need a 64bit dll.
Sorry for pushing this thread, but I had a suggestion which would be quite handy if it was implemented on mgit.
mgit compiling Lua code into a dynamic libraries.
I believe there are several ways to implement this; pushing the Lua functions being exposed into some library, expose them as FFI callbacks, looking up for the functions on the global environment, etc. And having a automatic wrapper which tell what functions are allowed to be exported.
The result may come into a slow implementation but at least there's the possibility to rely on being able to actually develop alternative dynamic libraries for software that doesn't support Lua or LuaJIT, which is much more simple than compiling code on some older low level programming languages (C/C++).