FYI: You might wish to look at sdk/scrollingdialog.cpp because I think it might violate your rules.
Edit: Looks like someone fixed it in the wrong way in the past; did NOT look at SVN history.
What it was in the past; as found on http://www.anthemion.co.uk/code.htm (http://www.anthemion.co.uk/code.htm)
// The wxRTTI is wrong for wxNotebook in < 2.8.8 and 2.9, so use dynamic_cast instead
#if !wxCHECK_VERSION(2,8,8) || (wxCHECK_VERSION(2,9,0) && !wxCHECK_VERSION(3,0,0))
wxBookCtrlBase* bookContentWindow = dynamic_cast<wxBookCtrlBase*>(dialog->GetContentWindow());
#else
wxBookCtrlBase* bookContentWindow = wxDynamicCast(dialog->GetContentWindow(), wxBookCtrlBase);
#endif
What it is now.
// The wxRTTI is wrong for wxNotebook in < 2.8.8 and 2.9, so use dynamic_cast instead
#if !wxCHECK_VERSION(2, 8, 8) && !wxCHECK_VERSION(3, 0, 0)
wxBookCtrlBase* bookContentWindow = dynamic_cast<wxBookCtrlBase*>(dialog->GetContentWindow());
#else
wxBookCtrlBase* bookContentWindow = wxDynamicCast(dialog->GetContentWindow(), wxBookCtrlBase);
#endif
What I think it should be by your rules.
// The wxRTTI is wrong for wxNotebook in < 2.8.8 and 2.9, so wxDynamicCast does NOT work for those versions.
wxBookCtrlBase* bookContentWindow = wxDynamicCast(dialog->GetContentWindow(), wxBookCtrlBase);
Tim S.