/***************************************************************************
**
**    $Header:   D:/ECB2S/SRC/LOG/CTAB.CPP   1.2.1.5   17 Apr 1997 15:44:04   ZJRD  $
**
**    $Log:   D:/ECB2S/SRC/LOG/CTAB.CPP  $
** 
**    Rev 1.2.1.5   17 Apr 1997 15:44:04   ZJRD
** No change.
** 
**    Rev 1.2.1.4   16 Apr 1997 10:18:32   ZJRD
** No change.
** 
**    Rev 1.2.1.3   10 Apr 1997 15:29:46   ZJRD
** 2.09F
** 
**    Rev 1.2.1.1   03 Apr 1997 15:11:00   ZJRD
** No change.
** 
**    Rev 1.2.1.0   28 Mar 1997 10:16:00   ZJRD
** easy pack sld 2.09d
** 
**    Rev 1.1   19 Mar 1997 11:27:12   ZJRD
** No change.
** 
**    Rev 1.0   12 Mar 1997 14:45:22   ZJRD
** Initial revision.
** 
**    Rev 1.3.1.0.1.2   09 Dec 1996 10:14:10   ZJRD
** EasyPack/SLD Version 2.0P
** 
**    Rev 1.3.1.0.1.0   11 Nov 1996 12:57:26   ZJRD
** EasyPack/SLD Version 2.01
** 
**    Rev 1.3.1.4   09 Sep 1996 13:13:26   ZJRD
** No change.
** 
**    Rev 1.3.1.3   05 Sep 1996 11:24:58   ZJRD
** No change.
** 
**    Rev 1.3.1.2   02 Sep 1996 09:52:06   ZJRD
** No change.
** 
**    Rev 1.3.1.1   28 Aug 1996 15:43:46   ZJRD
** EasyPack/SLD Version 1.9b
** 
**    Rev 1.3.1.0   12 Aug 1996 10:49:10   ZJRD
** EasyPack/SLD Version 1.98
** 
**    Rev 1.0   29 May 1996 09:35:36   ZJRD
** Initial revision.
** 
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
// ctab.cpp
//
// Michael Long
//                                                                           
// 5/15/96
//
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "resource.h"

#include "toolopt.h"    
#include "cc.h"
#include "ccoption.h"
#include "ca.h"
#include "caoption.h"
#include "cl.h"
#include "cloption.h"
#include "ce.h"
#include "ceoption.h"
#include "ctab.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
IMPLEMENT_DYNAMIC(CCTab, CPropertySheet)                                                

/////////////////////////////////////////////////////////////////////////////
// CCTab

CCTab::CCTab(CCTool * pc, CATool * pa, CLTool * pl,CETool *pe, CWnd *pParent)
 : CPropertySheet("2500AD Options", pParent),
    m_copt(pc), m_aopt(pa), m_lopt(pl), m_eopt(pe)
{
    AddPage(&m_copt);
    AddPage(&m_aopt);
    AddPage(&m_lopt);                             
    AddPage(&m_eopt);
}

CCTab::~CCTab()
{
}

BEGIN_MESSAGE_MAP(CCTab, CPropertySheet)
    //{{AFX_MSG_MAP(CCTab)
    ON_WM_CREATE()
    ON_COMMAND(IDOK, OnOK)
	ON_WM_SYSCOMMAND()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCTab message handlers


int CCTab::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (CPropertySheet::OnCreate(lpCreateStruct) == -1)
        return -1;
    
    // TODO: Add your specialized creation code here
    CenterWindow();
    
    GetDlgItem(ID_APPLY_NOW)->ShowWindow(SW_HIDE);
    
    return 0;
}

void CCTab::OnOK()
{
    GetActivePage()->UpdateData(TRUE);

    m_copt.SaveData();
    m_aopt.SaveData();
    m_lopt.SaveData();
    m_eopt.SaveData();
    
    CPropertySheet::OnOK();
}                           

void CCTab::OnSysCommand(UINT nID, LPARAM lParam)
{
	// TODO: Add your message handler code here and/or call default
	
    // Disable to move or restore main frame window.
    switch ( nID & 0x0FFF0 ) {
        case SC_MOVE:
            return;
        default:
            break;
    }

	CPropertySheet::OnSysCommand(nID, lParam);
}
