From: Mattia B. <mb...@ds...> - 2002-04-24 12:11:12
|
On Wed, 24 Apr 2002, Dave Roe wrote: >I would like to perform some custom painting on a sub-classed window. >I've derived a class called MyNotebook, inheriting from Wx::Notebook. I >can define an OnPaint handler with EVT_PAINT(), but how do I "invoke" >the event, so that the notebook's paint handler is called, before I >start to draw on top of that? I don't think this is a good way to do what you want to do, whatever it is. If you want to drwa in the client area of the notebook, you should put a Wx::Panel inside the notebook, If you want to draw outside the client area (inside the tabs), drawing inside native controls like this is dangerous (i.e. may fail in strange ways in different platforms, even if it works on platform X). If you really want ot do the latter, you should probably not use EVT_PAINT, and do the drawing in idle time. HTH Mattia |