- {
- wxNotebookEvent changing(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_windowId,
- ::GetControl32BitValue(control) - 1, m_nSelection);
- changing.SetEventObject(this);
- GetEventHandler()->ProcessEvent(changing);
-
- if(changing.IsAllowed())
- {
- controlpart = ::HandleControlClick(control, localwhere, modifiers,
- (ControlActionUPP) -1);
- wxTheApp->s_lastMouseDown = 0 ;
-
- wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_windowId,
- ::GetControl32BitValue(control) - 1, m_nSelection);
- event.SetEventObject(this);
+ wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_windowId,
+ newSel, m_nSelection);
+ event.SetEventObject(this);