?? dialogtrackstyle.cpp
字號:
// DialogTrackStyle.cpp : implementation file
//
#include "stdafx.h"
#include "圖像特征跟蹤系統(tǒng).h"
#include "DialogTrackStyle.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDialogTrackStyle property page
IMPLEMENT_DYNCREATE(CDialogTrackStyle, CPropertyPage)
CDialogTrackStyle::CDialogTrackStyle() : CPropertyPage(CDialogTrackStyle::IDD)
{
//{{AFX_DATA_INIT(CDialogTrackStyle)
m_strEigenSapceFilePath = _T("");
m_nEigenSpaceVectorNumber = 10;
m_nTrackStyle = 2;
//}}AFX_DATA_INIT
m_conTrackType = TT_AFFINE;
}
CDialogTrackStyle::~CDialogTrackStyle()
{
}
void CDialogTrackStyle::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDialogTrackStyle)
DDX_Text(pDX, IDC_EDIT_EIGENSPACE_FILEPATH, m_strEigenSapceFilePath);
DDX_Text(pDX, IDC_EDIT_EIGENSPACE_VECTOR_NUMBER, m_nEigenSpaceVectorNumber);
DDV_MinMaxInt(pDX, m_nEigenSpaceVectorNumber, 1, 2147483647);
DDX_Radio(pDX, IDC_RADIO_KL, m_nTrackStyle);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDialogTrackStyle, CPropertyPage)
//{{AFX_MSG_MAP(CDialogTrackStyle)
ON_BN_CLICKED(IDC_BUTTON_BROWSE, OnButtonBrowse)
ON_EN_CHANGE(IDC_EDIT_EIGENSPACE_VECTOR_NUMBER, OnChangeEditEigenspaceVectorNumber)
ON_BN_CLICKED(IDC_RADIO_KL, OnRadioKl)
ON_BN_CLICKED(IDC_RADIO_SVD, OnRadioSvd)
ON_BN_CLICKED(IDC_RADIO_AFFINE, OnRadioAffine)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDialogTrackStyle message handlers
void CDialogTrackStyle::OnButtonBrowse()
{
this->UpdateData(true);
CString szFilter;
if(m_conTrackType == TT_KL_AFFINE)
szFilter.Format("KL文件 (*.kl)|*.kl|");
else if(m_conTrackType == TT_SVD_AFFINE)
szFilter.Format("SVD文件 (*.voc)|*.voc|");
CFileDialog dlg(TRUE,"voc||kl",NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,szFilter);
if(dlg.DoModal() == IDOK)
{
m_strEigenSapceFilePath = dlg.GetPathName();
}
this->UpdateData(FALSE);
}
void CDialogTrackStyle::OnChangeEditEigenspaceVectorNumber()
{
this->UpdateData(true);
}
void CDialogTrackStyle::OnRadioKl()
{
m_nTrackStyle = 0;
m_conTrackType = TT_KL_AFFINE;
CWnd* pWnd = this->GetDlgItem(IDC_BUTTON_BROWSE);
pWnd->EnableWindow(true);
pWnd = this->GetDlgItem(IDC_EDIT_EIGENSPACE_FILEPATH);
pWnd->EnableWindow(true);
pWnd = this->GetDlgItem(IDC_EDIT_EIGENSPACE_VECTOR_NUMBER);
pWnd->EnableWindow(true);
}
void CDialogTrackStyle::OnRadioSvd()
{
m_nTrackStyle = 1;
m_conTrackType = TT_SVD_AFFINE;
CWnd* pWnd = this->GetDlgItem(IDC_BUTTON_BROWSE);
pWnd->EnableWindow(true);
pWnd = this->GetDlgItem(IDC_EDIT_EIGENSPACE_FILEPATH);
pWnd->EnableWindow(true);
pWnd = this->GetDlgItem(IDC_EDIT_EIGENSPACE_VECTOR_NUMBER);
pWnd->EnableWindow(true);
}
void CDialogTrackStyle::OnRadioAffine()
{
m_nTrackStyle = 2;
m_conTrackType = TT_AFFINE;
CWnd* pWnd = this->GetDlgItem(IDC_BUTTON_BROWSE);
pWnd->EnableWindow(false);
pWnd = this->GetDlgItem(IDC_EDIT_EIGENSPACE_FILEPATH);
pWnd->EnableWindow(false);
pWnd = this->GetDlgItem(IDC_EDIT_EIGENSPACE_VECTOR_NUMBER);
pWnd->EnableWindow(false);
}
BOOL CDialogTrackStyle::OnInitDialog()
{
CPropertyPage::OnInitDialog();
OnRadioAffine();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -