// Name: msw/notebook.cpp
// Purpose: implementation of wxNotebook
// Author: Vadim Zeitlin
-// Modified by:
+// Modified by:
// Created: 11.06.98
// RCS-ID: $Id$
// Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
(WPARAM)::GetStockObject(DEFAULT_GUI_FONT),TRUE);
- if ( parent != NULL )
+ if ( parent != NULL )
parent->AddChild(this);
-
+
SubclassWin(m_hWnd);
return TRUE;
}
void wxNotebook::SetImageList(wxImageList* imageList)
-{
+{
m_pImageList = imageList;
TabCtrl_SetImageList(m_hwnd, (HIMAGELIST)imageList->GetHIMAGELIST());
}
// remove all pages
bool wxNotebook::DeleteAllPages()
{
- TabCtrl_DeleteAllItems(m_hwnd);
-
int nPageCount = GetPageCount();
int nPage;
for ( nPage = 0; nPage < nPageCount; nPage++ )
m_aPages.Clear();
+ TabCtrl_DeleteAllItems(m_hwnd);
+
return TRUE;
}
// save the pointer to the page
m_aPages.Insert(pPage, nPage);
- // some page must be selected: either this one or the first one if there is
+ // some page must be selected: either this one or the first one if there is
// still no selection
if ( bSelect )
m_nSelection = nPage;
wxFAIL_MSG("wxNotebook::Command not implemented");
}
-bool wxNotebook::MSWNotify(WXWPARAM wParam, WXLPARAM lParam, WXLPARAM* result)
+bool wxNotebook::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM* result)
{
wxNotebookEvent event(wxEVT_NULL, m_windowId);
break;
default:
- return wxControl::MSWNotify(wParam, lParam, result);
+ return wxControl::MSWOnNotify(idCtrl, lParam, result);
}
event.SetSelection(TabCtrl_GetCurSel(m_hwnd));
event.SetOldSelection(m_nSelection);
event.SetEventObject(this);
- event.SetInt(LOWORD(wParam)); // ctrl id
+ event.SetInt(idCtrl);
bool processed = GetEventHandler()->ProcessEvent(event);
*result = !event.IsAllowed();