I have an MDI with a form, which has some tab controls and property sheets on it. From a menu command how do I create a new form which opens automatically at a tab I define, so from a menu command I could click page 2 and a new form would open at page 2? This is zMan's code/method which I am using for tab controls:
Code:
void CTykeView::CreateTabControl()
{
pSheet = new CPropertySheet( "My Tab", this, 0);
pSheet->AddPage( &m_Page1 );
pSheet->AddPage( &m_Page2 );
pSheet->AddPage( &m_Page3 );
pSheet->Create( this, WS_CHILD | WS_VISIBLE );
//** Create a static text with the resource editor where you
//** would like to position your control and bind a CStatic
//** member to it... you must change the default idd from
//** IDC_STATIC to IDC_STATIC1 or something more meaningfull
CRect r;
m_staticPlaceHolder.GetWindowRect( &r );
ScreenToClient( &r );
//** reposition the window where you want it.....
pSheet->SetWindowPos( pSheet, r.top, r.left, 0, 0, SWP_NOSIZE | SWP_NOZORDER );
return;
}