This is now a non-virtual function, with a wxPaintEvent& argument. Add an EVT_PAINT macro to the event table for your window.
Your function must create a wxPaintDC object, instead of using GetDC to obtain the device context.
If you are using a wxScrolledWindow (formerly wxCanvas), you should call PrepareDC(dc) to set the correct translation for the current scroll position.