X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2ddb4d13585d5235556119fb1937273da9e433a3..2fb0cabbf9e924c25d51b13bf7aa1ba8aa24e75e:/samples/notebook/notebook.cpp diff --git a/samples/notebook/notebook.cpp b/samples/notebook/notebook.cpp index ca1adf709a..0931f0a56d 100644 --- a/samples/notebook/notebook.cpp +++ b/samples/notebook/notebook.cpp @@ -765,8 +765,11 @@ void MyFrame::OnBookCtrl(wxBookCtrlBaseEvent& event) else if ( eventType == ei.typeChanging ) { const int idx = event.GetOldSelection(); + + // NB: can't use wxStaticCast here as wxBookCtrlBase is not in + // wxRTTI const wxBookCtrlBase * const - book = wxStaticCast(event.GetEventObject(), wxBookCtrlBase); + book = wx_static_cast(wxBookCtrlBase *, event.GetEventObject()); if ( idx != wxNOT_FOUND && book && book->GetPageText(idx) == VETO_PAGE_NAME ) {