+ // fit the notebook page to the tab control's display area: this should be
+ // done before adding it to the notebook or TabCtrl_InsertItem() will
+ // change the notebooks size itself!
+ RECT rc;
+ rc.left = rc.top = 0;
+ GetSize((int *)&rc.right, (int *)&rc.bottom);
+ TabCtrl_AdjustRect(m_hwnd, FALSE, &rc);
+ pPage->SetSize(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top);