/***************************************************************************
**
**    $Header:   D:/EPSLDV1/SRC/LOG/ATAB.CPP   1.6   20 Jun 1996 09:30:22   ZJRD  $
**
**    $Log:   D:/EPSLDV1/SRC/LOG/ATAB.CPP  $
** 
**    Rev 1.6   20 Jun 1996 09:30:22   ZJRD
** EasyPack/SLD Version 1.20a
** 
**    Rev 1.4   10 Jun 1996 10:25:00   ZJRD
** EasyPack/SLD Version 1.20
** 
**    Rev 1.2   29 May 1996 09:37:42   ZJRD
** EasyPack/SLD Version 1.95
** 
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
// atab.cpp
//
// Roger Zhang
//                                                                           
// 5/2/96
//
/////////////////////////////////////////////////////////////////////////////

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

#include "toolopt.h"    
#include "ac.h"
#include "acoption.h"
#include "aa.h"
#include "aaoption.h"
#include "al.h"
#include "aloption.h"
#include "ae.h"
#include "aeoption.h"
#include "alib.h"
#include "aliboption.h"
#include "atab.h"

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

/////////////////////////////////////////////////////////////////////////////
IMPLEMENT_DYNAMIC(CATab, CPropertySheet)                                                

/////////////////////////////////////////////////////////////////////////////
// CATab

CATab::CATab(ACTool * pc, AATool * pa, ALTool * pl,ALIBTool * plib,AETool * pe, CWnd *pParent)
 : CPropertySheet("ICC51 Options", pParent),
    m_copt(pc), m_aopt(pa), m_lopt(pl) , m_libopt(plib), m_eopt(pe)
{
    AddPage(&m_copt);
    AddPage(&m_aopt);
    AddPage(&m_lopt);
    AddPage(&m_libopt);
    AddPage(&m_eopt);
}

CATab::~CATab()
{
}

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

/////////////////////////////////////////////////////////////////////////////
// CATab message handlers


int CATab::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 CATab::OnOK()
{
    GetActivePage()->UpdateData(TRUE);

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