Is "virtualizing" wxWindow::OnPaint() "legal"?
Dave Bee
davebeeus at yahoo.com
Fri Dec 8 09:10:16 PST 2006
I need to perform an operation that occurs exactly
*after* the EVT_PAINT of a certain wxWindow-derived
class has been processed.
I am not interested in cancelling the default
EVT_PAINT handling, but rather just add something to
it at the end.
My thought is to define an EVT_PAINT handler for the
derived class, say MyWizardPage::OnPaint() and inside
do:
void MyWizardPage::OnPaint(wxPaintEvent& event)
{
wxWizardPageSimple::OnPaint(event);
MySpecialOperation();
}
I know it works, because I just tried it.
But is this considered bad practice? That is, relying
on an undocumented base class function
(wxWindow::OnPaint)?
Thanks,
Dave
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
More information about the wx-users
mailing list