// wxWindows
#ifndef WX_PRECOMP
- #include <wx/string.h>
+ #include "wx/string.h"
#endif // WX_PRECOMP
-#include <wx/log.h>
-#include <wx/imaglist.h>
-#include <wx/event.h>
-#include <wx/control.h>
-#include <wx/notebook.h>
+#include "wx/log.h"
+#include "wx/imaglist.h"
+#include "wx/event.h"
+#include "wx/control.h"
+#include "wx/notebook.h"
-#include <wx/msw/private.h>
+#include "wx/msw/private.h"
// Windows standard headers
#ifndef __WIN95__
// 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)
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
// no selection if the notebook became empty
m_nSelection = -1;
}
+ else
+ m_nSelection = TabCtrl_GetCurSel(m_hwnd);
+
return TRUE;
}
m_aPages.Remove(nPage);
+ if ( m_aPages.IsEmpty() )
+ m_nSelection = -1;
+ else
+ m_nSelection = TabCtrl_GetCurSel(m_hwnd);
+
return TRUE;
}
TabCtrl_DeleteAllItems(m_hwnd);
+ m_nSelection = -1;
+
return TRUE;
}