I have read several demos given by the wxWidget package, but none of them is 'multi interface'. Say I want to write a simple game using wxWidget, I may need a menu interface, a game interface, a setting interface and so on. My question is how can I build them into a single App? Do I need several wxFrame and Close and Show them from time to time? (However when I close it the application is terminated) Or is there an another way?
You can indeed have multiple frames, but by default closing the last frame terminates the application. You can use SetExitOnFrameDelete(false) to prevent this from happening or just make sure that you create the new/next frame (without necessarily showing it) before closing the previous one.
It is also possible to simply show different contents inside the same frame, e.g. by creating and showing different wxPanel
s inside it. wxSimplebook can be useful for this.