X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47f12f58dbd5e62c5d1c635142a26c3e2208d012..c6e62f74fcac5b62889b59e7ce7a41d0ce884d7b:/src/msw/notebook.cpp diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index d2fe79e557..43b70d1dbb 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -83,7 +83,6 @@ // event table // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARIES BEGIN_EVENT_TABLE(wxNotebook, wxControl) EVT_NOTEBOOK_PAGE_CHANGED(-1, wxNotebook::OnSelChange) @@ -96,7 +95,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent) -#endif // ============================================================================ // 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; }