So...
I've got one. It doesn't have middle-click-close or right-click menus yet, but it does switch pages and close them with the button. The code might not be totally readable... but it should work.
The code is attached.
If anybody knows how to make it behave more like a real wxControl (currently it's just a wxPanel), I'd appreciate it if they'd tell me... or do it for me (for example, styles?).
Also, it looks a bit.... not right. I tried overloading wxWindow's Layout() to move the sizer which contains the displayed panel up 2 pixels, to remove that little bit of space between the wxNotebook and the panels, but that just ends up with the screen flashing a bunch, even if I do use Freeze/Thaw.
The syntax is pretty obvious; just like any other wxWindow, except, after the id, there's an argument of the bitmap for the close button. Currently, the close button doesn't have any borders, so it really doesn't look like a button at all (you can add in some code to change the image when it's clicked, if you want). You could add borders, too, by removing the wxNO_BORDERS for the wxBitmapButton.
[attachment deleted by admin]