Hi! Well, you can't "add" a wxDC to your app like a wxTextCtrl or such. A DC is, as you said, a device context and basically is some space you can draw on. You'll have to create one of the following wxDC classes in order to start drawing: wxScreenDC (for drawing on the whole screen) wxClientDC (drawing on the client area of a window) wxWindowDC (drawing on the whole window area) There's also wxPaintDC which can only bve used inside the Pain Event Handler.
Normaly you will want to draw on some kind of canvas. A simple wxPanel is ok most of the times. Create a panle inside your frame, create a wxClientDC(pointer_to_panel) and then draw on the dc.
upCASE ----------------------------------- If it was hard to write, it should be hard to read!- Do. Or do not. There is no try! |