stack overflow when clicking on the arrow in a notebook fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -161,8 +161,6 @@ bool wxNotebook::Create(wxWindow *parent,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @@@ this crashes the application with "Invalid instruction" exception
|
|
||||||
// deep inside Windows -- why???
|
|
||||||
SetWindowFont((HWND)m_hwnd, ::GetStockObject(DEFAULT_GUI_FONT), FALSE);
|
SetWindowFont((HWND)m_hwnd, ::GetStockObject(DEFAULT_GUI_FONT), FALSE);
|
||||||
|
|
||||||
if ( parent != NULL )
|
if ( parent != NULL )
|
||||||
@@ -434,8 +432,7 @@ void wxNotebook::Command(wxCommandEvent& event)
|
|||||||
|
|
||||||
bool wxNotebook::MSWNotify(WXWPARAM wParam, WXLPARAM lParam)
|
bool wxNotebook::MSWNotify(WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
wxNotebookEvent event(wxEVT_NULL, m_windowId,
|
wxNotebookEvent event(wxEVT_NULL, m_windowId);
|
||||||
TabCtrl_GetCurSel(m_hwnd), m_nSelection);
|
|
||||||
|
|
||||||
NMHDR* hdr = (NMHDR *)lParam;
|
NMHDR* hdr = (NMHDR *)lParam;
|
||||||
switch ( hdr->code ) {
|
switch ( hdr->code ) {
|
||||||
@@ -447,16 +444,17 @@ bool wxNotebook::MSWNotify(WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING);
|
event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// if we don't intercept it here this message is passed to our parent (if
|
// prevent this msg from being passed to wxControl::MSWNotify which would
|
||||||
// we have one) and then lost in it's DefWindowProc
|
// retrun FALSE disabling the change of page
|
||||||
case UDN_DELTAPOS:
|
case UDN_DELTAPOS:
|
||||||
MSWDefWindowProc(WM_NOTIFY, wParam, lParam);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
default :
|
default :
|
||||||
return wxControl::MSWNotify(wParam, lParam);
|
return wxControl::MSWNotify(wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
event.SetSelection(TabCtrl_GetCurSel(m_hwnd));
|
||||||
|
event.SetOldSelection(m_nSelection);
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
event.SetInt(LOWORD(wParam));
|
event.SetInt(LOWORD(wParam));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user