Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
The attachment is the source code.
I compile the code use wxWidgts2.8.12, the background of the wxToolbar refreshed OK,
but it not refreshed when compile by wxWidegets2.9.3.