X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47f12f58dbd5e62c5d1c635142a26c3e2208d012..37b8e6798782278fdfe4f3c1291aaff55cdbb8c9:/src/msw/notebook.cpp?ds=sidebyside diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index d2fe79e557..185a915c58 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -83,8 +83,7 @@ // event table // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARIES - BEGIN_EVENT_TABLE(wxNotebook, wxControl) +BEGIN_EVENT_TABLE(wxNotebook, wxControl) EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) EVT_SIZE(wxNotebook::OnSize) @@ -92,11 +91,10 @@ EVT_SET_FOCUS(wxNotebook::OnSetFocus) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) - END_EVENT_TABLE() +END_EVENT_TABLE() - IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) - IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent) -#endif +IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent) // ============================================================================ // implementation @@ -316,6 +314,9 @@ bool wxNotebook::DeletePage(int nPage) // no selection if the notebook became empty m_nSelection = -1; } + else + m_nSelection = TabCtrl_GetCurSel(m_hwnd); + return TRUE; } @@ -331,6 +332,8 @@ bool wxNotebook::RemovePage(int nPage) if ( m_aPages.IsEmpty() ) m_nSelection = -1; + else + m_nSelection = TabCtrl_GetCurSel(m_hwnd); return TRUE; }