If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Use a wxMemoryDC; select a bitmap in it, then you can blit you drawing to the bitmap. Once you have the bitmap, use its SaveFile method (alternatively, draw directly on a bitmap, then show the bitmap and save it).
"Keyboard not detected. Press F1 to continue"
-- Windows