// CamInfoTabDlg.cpp : implementation file
//

#include "stdafx.h"
#include "TCTb.h"


#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCamInfoTabDlg

IMPLEMENT_DYNAMIC(CCamInfoTabDlg, CPropertySheet)

CCamInfoTabDlg::CCamInfoTabDlg(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
NumTabs=0;

}

CCamInfoTabDlg::CCamInfoTabDlg(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
	:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
NumTabs=0;

}

CCamInfoTabDlg::~CCamInfoTabDlg()
{
int i;
for(i=0;i<NumTabs;i++) delete Tab[i];
NumTabs=0;

}


BEGIN_MESSAGE_MAP(CCamInfoTabDlg, CPropertySheet)
	//{{AFX_MSG_MAP(CCamInfoTabDlg)
	ON_WM_CLOSE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCamInfoTabDlg message handlers

void CCamInfoTabDlg::SetCameraInfo(CameraInfo *CIn)
{
int i;
for(i=0;i<NumTabs;i++) Tab[i]->SetCamInfo(CIn);
}

void CCamInfoTabDlg::Refresh()
{
Tab[GetActiveIndex()]->Refresh();
}

BOOL CCamInfoTabDlg::Create( CWnd* pParentWnd, DWORD dwStyle, DWORD dwExStyle )
{
return CPropertySheet::Create( pParentWnd , dwStyle , dwExStyle);
}

void CCamInfoTabDlg::AddPage( CCamInfoPage *pPage )
{
Tab[NumTabs++]=pPage;
CPropertySheet::AddPage(pPage);
}

void CCamInfoTabDlg::OnClose() 
{
	// TODO: Add your message handler code here and/or call default
//	ShowWindow(SW_MINIMIZE);
	ShowWindow(SW_HIDE);
//	CPropertySheet::OnClose();
}
