+ // fit the notebook page to the tab control's display area
+ RECT rc;
+ rc.left = rc.top = 0;
+ GetSize((int *)&rc.right, (int *)&rc.bottom);
+
+ TabCtrl_AdjustRect(m_hwnd, FALSE, &rc);
+ uint nCount = m_aPages.Count();
+ for ( uint nPage = 0; nPage < nCount; nPage++ ) {
+ wxNotebookPage *pPage = m_aPages[nPage];
+ pPage->SetSize(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top);
+ if ( pPage->GetAutoLayout() )
+ pPage->Layout();
+ }
+