/********************************************************************/
/* Copyright (c) 2019 System fugen G.K. and Yuzi Mizuno          */
/* All rights reserved.                                             */
/********************************************************************/
/********************************************************************/
// GLMeshSaveDlg.cpp : 実装ファイル

#include "stdafx.h"
#include "fugen.h"
#include "GLMeshSaveDlg.h"
#include "GLWndMsg.h"

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

// CGLMeshSaveDlg ダイアログ

IMPLEMENT_DYNAMIC(CGLMeshSaveDlg, CDialog)

CGLMeshSaveDlg::CGLMeshSaveDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CGLMeshSaveDlg::IDD, pParent)
{
}

CGLMeshSaveDlg::~CGLMeshSaveDlg()
{
}

void CGLMeshSaveDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
}

BEGIN_MESSAGE_MAP(CGLMeshSaveDlg, CDialog)
	ON_BN_CLICKED(IDC_MESH_SAVE_BUTTON, OnBnClickedMeshSaveButton)
END_MESSAGE_MAP()

BOOL CGLMeshSaveDlg::OnInitDialog()
{
	if(!CDialog::OnInitDialog()){
		return FALSE;
	}

	UpdateData(FALSE);
	return TRUE;
}

void CGLMeshSaveDlg::OnBnClickedMeshSaveButton()
{
	if(!UpdateData()){
		return;
	}

	// 親ダイアログ経由で保存イベント発生をコマンドに知らせる。
	GetParent()->SendMessage(WM_FUGEN_MESH_SAVE);
}
