wxeraseeventan erase event is sent when a window's background needs to be repainted. on some platforms, such as gtk+, this event is simulated (simply generated just before the paint event) and may cause flicker. it is therefore recommended that you set the text background colour explicitly in order to prevent flicker. the default background colour under gtk+ is grey. to intercept this event, use the evt_erase_background macro in an event table definition. you must call wxeraseevent::getdc and use the returned device context if it is non-null. if it is null, create your own temporary wxclientdc object. derived from include files <wx/event.h> event table macros to process an erase event, use this event handler macro to direct input to a member function that takes a wxeraseevent argument.
use the device context returned by getdc to draw on, don't create a wxpaintdc in the event handler. see also members
wxeraseevent::wxeraseevent
wxeraseevent::wxeraseeventwxeraseevent(int id = 0, wxdc* dc = null) constructor.
wxeraseevent::getdcwxdc* getdc() const returns the device context associated with the erase event to draw on.
|