// SetAnimation.cpp : 実装ファイル // #include "stdafx.h" #include "SLKinect.h" #include "SetAnimation.h" #include "MessageBoxDLG.h" // CSetAnimation ダイアログ IMPLEMENT_DYNAMIC(CSetAnimation, CDialog) CSetAnimation::CSetAnimation(CParameterSet prm, BOOL login, CWnd* pParent /*=NULL*/) : CDialog(CSetAnimation::IDD, pParent) { param = prm; isLogin = login; animUUIDEBox = NULL; } void CSetAnimation::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); } BEGIN_MESSAGE_MAP(CSetAnimation, CDialog) END_MESSAGE_MAP() // CSetAnimation メッセージ ハンドラ void CSetAnimation::OnOK() { char buf[NISMEM_INDEX_LEN]; memset(buf, 0, NISMEM_INDEX_LEN); animUUIDEBox->GetWindowText(buf, NISMEM_INDEX_LEN); memset(buf+ANM_COM_LEN_UUID+1, 0, NISMEM_INDEX_LEN-ANM_COM_LEN_UUID-1); if (strlen(buf)!=ANM_COM_LEN_UUID) { animUUIDEBox->SetWindowText((LPCSTR)param.animationUUID); MessageBoxDLG(IDS_STR_ATTNSN, IDS_STR_SET_INVALID_UUID, MB_OK, this); return; } param.animationUUID.SetString(buf); CDialog::OnOK(); } BOOL CSetAnimation::OnInitDialog() { CDialog::OnInitDialog(); animUUIDEBox = (CEdit*)GetDlgItem(IDC_EDIT_ANIMATION_UUID); animUUIDEBox->SetWindowText((LPCSTR)param.animationUUID); if (isLogin) animUUIDEBox->EnableWindow(FALSE); return TRUE; // return TRUE unless you set the focus to a control }