dlgmotionsegparams.cpp

来自「在人脸检测的基础之上,对嘴部的运动表情进行分析,进行语音模拟.」· C++ 代码 · 共 88 行

CPP
88
字号
// DlgMotionSegParams.cpp : implementation file
//

#include "stdafx.h"
#include "SeqProcess.h"
#include "DlgMotionSegParams.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDlgMotionSegParams dialog


CDlgMotionSegParams::CDlgMotionSegParams(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgMotionSegParams::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgMotionSegParams)
	m_NumberMotClass = 2;
	m_no_frames = 0;
	//}}AFX_DATA_INIT
}


void CDlgMotionSegParams::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgMotionSegParams)
	DDX_Text(pDX, IDC_EDIT_MOTION_CLASS, m_NumberMotClass);
	DDV_MinMaxInt(pDX, m_NumberMotClass, 2, 20);
	DDX_Text(pDX, IDC_EDIT_NO_FRAMES, m_no_frames);
	DDV_MinMaxInt(pDX, m_no_frames, 2, 300);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgMotionSegParams, CDialog)
	//{{AFX_MSG_MAP(CDlgMotionSegParams)
	ON_EN_CHANGE(IDC_EDIT_MOTION_CLASS, OnChangeEditMotionClass)
	ON_BN_CLICKED(ID_PARAMS_MOTIONSEG_OK, OnParamsMotionsegOk)
	ON_BN_CLICKED(ID_PARAMS_MOTIONSEG_CANCEL, OnParamsMotionsegCancel)
	ON_BN_CLICKED(ID_PARAMS_MOTIONSEG_APPLY, OnParamsMotionsegApply)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgMotionSegParams message handlers


void CDlgMotionSegParams::OnChangeEditMotionClass() 
{
	GetDlgItem( ID_PARAMS_MOTIONSEG_OK)->EnableWindow( FALSE);

}
//-------------------------------------------------------------------------

void CDlgMotionSegParams::OnParamsMotionsegApply() 
{
	UpdateData(TRUE);

	if ( m_NumberMotClass <= 1 || m_NumberMotClass > 10 ) 
	{
		MessageBox("Enter an integer between 2 and 10");
		return;
	}
	GetDlgItem( ID_PARAMS_MOTIONSEG_OK)->EnableWindow( TRUE);	

}
//-------------------------------------------------------------------------

void CDlgMotionSegParams::OnParamsMotionsegOk() 
{
	EndDialog(IDOK);	
	
}
//-------------------------------------------------------------------------

void CDlgMotionSegParams::OnParamsMotionsegCancel() 
{
	EndDialog(IDCANCEL);	
	
}
//-------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?