// PreInitFile.cpp : _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_
//

#include "stdafx.h"
#include "DynamicDraw.h"
#include "UtilStr.h"		// For GetResString.
#include "UtilDlg.h"		// For SetUnitString.etc.
#include "UtilFile.h"		// For SplitFileName.
#include "UtilWin.h"		// For FFGetMolipExePath.
#include "RegData.h"		// For GetRegTemplate.
#include "FoundDoc.h"		// For CFCFoundDoc.
#include "FileDialogBase.h"	// For FCFileDialogBase.
#include "FileConv.h"		// For FCFileConvManager.
#include "PreInitFile.h"	// This header.

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

/////////////////////////////////////////////////////////////////////////////
// CFCPreInitFile _xZkqqHx_iDhGiDiNiDhAiDgFiDeC_xHqqkZx_ _xZkqqHx_iDhJiBfLiDfH_xHqqkZx_

IMPLEMENT_DYNCREATE(CFCPreInitFile, CFCPropertyPageBase)

CFCPreInitFile::CFCPreInitFile () : BASE_CLASS(CFCPreInitFile::IDD)
{
	//{{AFX_DATA_INIT(CFCPreInitFile)
		// _xZkqqHx_iDiBiDiC_xHqqkZx_ - ClassWizard _xZkqqHx_iCmNiClBiCmMiImKjChFiCmJiDiBiDjDiDgPiCmMiPiJiKpKiJlLiPiIjHjNiCpAjCmHiJmBiClFiCnMiClHiBeC_xHqqkZx_
	//}}AFX_DATA_INIT
} // CFCPreInitFile::CFCPreInitFile.

CFCPreInitFile::~CFCPreInitFile ()
{
} // CFCPreInitFile::~CFCPreInitFile.

void CFCPreInitFile::DoDataExchange(CDataExchange* pDX)
{
	BASE_CLASS::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CFCPreInitFile)
		// _xZkqqHx_iDiBiDiC_xHqqkZx_ - ClassWizard _xZkqqHx_iCmNiClBiCmMiImKjChFiCmJiDhNiDgCiDhDiDjDiDePjHhAiCmMiDhNiDeOiDiNiCpAjCmHiJmBiCnMiClNiCmNiNoNiPjMiClFiCnMiClHiBeC_xHqqkZx_
	//}}AFX_DATA_MAP
} // CFCPreInitFile::DoDataExchange.

BEGIN_MESSAGE_MAP(CFCPreInitFile, BASE_CLASS)
	//{{AFX_MSG_MAP(CFCPreInitFile)
	ON_BN_CLICKED(IDC_ITL_BTN_TEMPLATE_PATH, OnItlBtnTemplatePath)
	ON_EN_CHANGE(IDC_ITL_EDT_TEMPLATE_PATH, OnChangeItlEdtTemplatePath)
	ON_EN_CHANGE(IDC_ITL_EDT_KEY_MAP_PATH, OnChangeItlEdtKeyMapPath)
	ON_BN_CLICKED(IDC_ITL_BTN_KEY_MAP_PATH, OnItlBtnKeyMapPath)
	ON_BN_CLICKED(IDC_ITL_CHK_OPEN_UNKNOWN, OnItlChkOpenUnknown)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFCPreInitFile _xZkqqHx_iDiGiBfLiDfFiKnGjAjEiBeC_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPreInitFile::UpdateModified
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jBkOjAkLiCmJjFmPiNfIiCkKiCkAiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiBeBiIoKiCmCiCmFiCoAjFmPiNfIiCkKiCkAiCoKiCmOiPeDjAlDiDhEiDiJiDeP_xHqqkZx_
 *			_xZkqqHx_iCpAjAnNjCoIiClHiCoJiBeCiIoKiCmCiCoAjFmPiNfIiCkKiCmIiCkPiCoKiCmOiPeDjAlDiDhEiDiJiDePiCpAiJpAiPjMiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.24 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPreInitFile::UpdateModified ()
{
	BOOL bModified = FALSE;
	WString wstrCtrl;
	WString wstrReg;
	FFGetDlgItemText(this, IDC_ITL_EDT_TEMPLATE_PATH, wstrCtrl);
	g_pReg->GetStdTemplate(wstrReg);
	if (wstrCtrl != wstrReg) bModified = TRUE;
	FFGetDlgItemText(this, IDC_ITL_EDT_KEY_MAP_PATH, wstrCtrl);
	g_pReg->GetHandsTableFile(wstrReg);
	if (wstrCtrl != wstrReg) bModified = TRUE;
	BOOL bIsOpenCtrl = IsDlgButtonChecked(IDC_ITL_CHK_OPEN_UNKNOWN);
	if (g_pReg->GetIsOpenUnknown() != bIsOpenCtrl)
		bModified = TRUE;
	SetModified(bModified);
} // CFCPreInitFile::UpdateModified.

/////////////////////////////////////////////////////////////////////////////
// CFCPreInitFile _xZkqqHx_iDiBiDgCiDfKiBfLiDfH_xHqqkZx_ _xZkqqHx_iDgOiDjDiDgIiDiJ_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPreInitFile::OnInitDialog
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfPiDeDiDeBiDiNiDePiPiJiKpKiJlLiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iImIiJlKiDfCiDiBiDjDiDgHiOfBiPmGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.02.07 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CFCPreInitFile::OnInitDialog ()
{
	// Superclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnInitDialog();

	//----- _xZkqqHx_iDeMiBfLiDhNiDgCiDhGiDhEiDeAiDeDiDiLjGlMiCpAjAnNjCoI_xHqqkZx_ -----
	WString strFile;
	g_pReg->GetHandsTableFile(strFile);
	FFSetDlgItemText(this, IDC_ITL_EDT_KEY_MAP_PATH, strFile);

	switch (g_->appMode & FD_APPMODE_MASK)
	{
	case FD_APPMODE_DYNAMICDRAW:	// DynamicDraw_xZkqqHx_iDiCiBfLiDgIiBeC_xHqqkZx_
	  {
		//----- _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLjGlMiCpAjAnNjCoI_xHqqkZx_ -----
		g_pReg->GetStdTemplate(strFile);
		FFSetDlgItemText(this, IDC_ITL_EDT_TEMPLATE_PATH, strFile);
		// _xZkqqHx_iBhFiLeOjDkOiOjOiCmJjAfGiLeLjFlGiPjBiCpAiKeKiCkNiBhGiCmNiOhHjCoIiCmFiCkLiCmIiCkCiBeC_xHqqkZx_
		GetDlgItem(IDC_ITL_CHK_OPEN_UNKNOWN)->ShowWindow(SW_HIDE);
		break;
	  }
	case FD_APPMODE_HISTORICDRAW:	// HistoricDraw_xZkqqHx_iDiCiBfLiDgIiBeC_xHqqkZx_
	  {
		//----- _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLjGlMiCpAjAnNjCoI_xHqqkZx_ -----
		g_pReg->GetStdTemplate(strFile);
		FFSetDlgItemText(this, IDC_ITL_EDT_TEMPLATE_PATH, strFile);
		// _xZkqqHx_iBhFiLeOjDkOiOjOiCmJjAfGiLeLjFlGiPjBiCpAiKeKiCkNiBhGiCpAjAnNjCoIiBeC_xHqqkZx_
		CheckDlgButton(IDC_ITL_CHK_OPEN_UNKNOWN, g_pReg->GetIsOpenUnknown());
		break;
	  }
	default:
		// _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLjGlMiCmNiOhHjCoIiCmFiCkLiCmIiCkCiBeC_xHqqkZx_
		GetDlgItem(IDC_ITL_STC_TEMPLATE_PATH)->ShowWindow(SW_HIDE);
		GetDlgItem(IDC_ITL_EDT_TEMPLATE_PATH)->ShowWindow(SW_HIDE);
		GetDlgItem(IDC_ITL_BTN_TEMPLATE_PATH)->ShowWindow(SW_HIDE);
		// _xZkqqHx_iBhFiLeOjDkOiOjOiCmJjAfGiLeLjFlGiPjBiCpAiKeKiCkNiBhGiCmNiOhHjCoIiCmFiCkLiCmIiCkCiBeC_xHqqkZx_
		GetDlgItem(IDC_ITL_CHK_OPEN_UNKNOWN)->ShowWindow(SW_HIDE);
	}

	// _xZkqqHx_jBkOjAkLiCmJjFmPiNfIiCkKiCkAiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
	UpdateModified();

	// _xZkqqHx_iDfPiDeDiDeBiDiNiDePiCmMjCfAiImKjFfMiOkGiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
	::SetUnitString(m_hWnd);
	// _xZkqqHx_jHjIiCkLjIhCjBmOiJjOjFlGiOjKjHpBiCmMjAnNjCoIiCpAiNhDiCkEiBeC_xHqqkZx_
	::RightByLeftHand(m_hWnd);
	return TRUE;  // _xZkqqHx_iDfCiDjDiDgHiDiNiBfLiDiLiCmJiDhEiDeIiBfLiDeKiDfIiCpAjAnNjCoIiClFiCmIiCkCiCmGiCkLiBeBjGnPiCoIjCgMiCmN_xHqqkZx_ TRUE _xZkqqHx_iCmGiCmIiCoIiCnMiClH_xHqqkZx_
	              // _xZkqqHx_jHoBiKeP_xHqqkZx_: OCX _xZkqqHx_iDhGiDiNiDhAiDgFiDeC_xHqqkZx_ _xZkqqHx_iDhJiBfLiDfHiCmMjGnPiCoIjCgMiCmN_xHqqkZx_ FALSE _xZkqqHx_iCmGiCmIiCoIiCnMiClH_xHqqkZx_
} // CFCPreInitFile::OnInitDialog.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPreInitFile::OnOK
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	OK_xZkqqHx_iDhLiDfOiDjDiCkJiCoHiOmAiNhDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.07.21 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPreInitFile::OnOK ()
{
	//----- _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLjGlMiCpAjAnNjCoI_xHqqkZx_ -----
	WString	str;
	FFGetDlgItemText(this, IDC_ITL_EDT_TEMPLATE_PATH, str);
	g_pReg->SetStdTemplate(str);

	//----- _xZkqqHx_iDeMiBfLiDhNiDgCiDhGiDhEiDeAiDeDiDiLjGlMiCpAjAnNjCoI_xHqqkZx_ -----
	FFGetDlgItemText(this, IDC_ITL_EDT_KEY_MAP_PATH, str);
	g_pReg->SetHandsTableFile(str);

	// _xZkqqHx_iBhFiLeOjDkOiOjOiCmJjAfGiLeLjFlGiPjBiCpAiKeKiCkNiBhGiCpAjAnNjCoIiBeC_xHqqkZx_
	BOOL bIsOpenCtrl = IsDlgButtonChecked(IDC_ITL_CHK_OPEN_UNKNOWN);
	g_pReg->SetIsOpenUnknown(bIsOpenCtrl);

	// Superclass_xZkqqHx_iKnGjAjEiBeC_xHqqkZx_
	BASE_CLASS::OnOK();
} // CFCPreInitFile::OnOK.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPreInitFile::OnItlBtnTemplatePath
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiOfBiPmGiDhLiDfOiDjDiCkJiCoHiOmAiNhDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.07.21 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPreInitFile::OnItlBtnTemplatePath ()
{
//----- 05.08.04 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	// _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLjGlMiCpAiOoGjDlOiBeC_xHqqkZx_
//	WString strFile;
//	(void)g_pReg->GetStdTemplate(strFile);
//	WString wstrDirPath;
//	if (!strFile.IsEmpty())
//	//----- _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLjGlMiCkKjBlGiNnNiClHiCoJiPoKiNiH_xHqqkZx_ -----
//	{
//		// _xZkqqHx_iDhEiDeAiDeDiDiLiDhAiDfIjGlMiCkJiCoHiDhAiDfIjFjEjFkKiCpAjFkKjHkDiClHiCoJiBeC_xHqqkZx_
//// 05.08.01 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
////		wstrDirPath = FFGetFileDirectory(strFile) + L"*.mdwt";
//		wstrDirPath = FFGetFileDirectory(strFile);
//	} else
//	//----- _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLjGlMiCkKjBlGiNnNiClFiCmIiCkCiPoKiNiH_xHqqkZx_ -----
//	{
//		// _xZkqqHx_jFfHiPiAiCmMiDgFiDjDiDhGiDiMiBfLiDgHiOpLjIfOiDhEiDeIiDiLiDfPiCkJiCoHiBeC_xHqqkZx_
//// 05.08.01 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
////		wstrDirPath = FFGetTemplateDirPath() + L"*.mdwt";
//		wstrDirPath = FFGetTemplateDirPath();
//	}
//
////----- 05.08.01 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
////	CFCFldgBase dlgFile(TRUE, NULL, WStrToTStr(wstrDirPath),
////						OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_NOCHANGEDIR,
////						_T("Portable Format Files (*.mdpf)|*.mdpf||"));
////	// _xZkqqHx_iDhHiDiLiDhGiDhLiDfOiDjDiCpAiPmBiLiOiBeC_xHqqkZx_
////	dlgFile.m_ofn.Flags &= ~OFN_SHOWHELP;
////	// _xZkqqHx_iDfOiDeDiDgHiDiLjGlMiCmMjAnNjCoIiBeC_xHqqkZx_
////	// IDS_MSG_OPEN_TEMPLATE = "_xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLiCpAiKeKiCkN_xHqqkZx_"
////	CString strDlgTitle = FFLoadString(IDS_MSG_OPEN_TEMPLATE);
////	dlgFile.m_ofn.lpstrTitle = strDlgTitle;
////----- 05.08.01 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	// _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLjGlMiCpAiOoGjDlOiBeC_xHqqkZx_
	WString strFile;
	(void)g_pReg->GetStdTemplate(strFile);
	WString wstrDirPath;
	if (!strFile.IsEmpty())
	//----- _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLjGlMiCkKjBlGiNnNiClHiCoJiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_iDhEiDeAiDeDiDiLiDhAiDfIjGlMiCkJiCoHiDhAiDfIjFjEjFkKiCpAjFkKjHkDiClHiCoJiBeC_xHqqkZx_
		wstrDirPath = FFGetFileDirectory(strFile);
	} else
	//----- _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLjGlMiCkKjBlGiNnNiClFiCmIiCkCiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_jFfHiPiAiCmMiDgFiDjDiDhGiDiMiBfLiDgHiOpLjIfOiDhEiDeIiDiLiDfPiCkJiCoHiBeC_xHqqkZx_
		wstrDirPath = FFGetTemplateDirPath();
	}
	WString wstrFilePath;
	if (CFCFoundDoc::DoModalImportDialog(wstrFilePath, NULL, wstrDirPath) == IDOK)
	{
		FFSetDlgItemText(this, IDC_ITL_EDT_TEMPLATE_PATH, wstrFilePath);
		// _xZkqqHx_jBkOjAkLiCmJjFmPiNfIiCkKiCkAiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
		UpdateModified();
	}
//----- 05.08.04 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
} // CFCPreInitFile::OnItlBtnTemplatePath.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPreInitFile::OnChangeItlEdtTemplatePath
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeAiDeDiDiLjGlMiDeHiDgGiDeCiDgCiDgHiCkKjFmPiNfIiClDiCoKiClNiOjOiOmAiNhDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.07.21 Fukushiro M. _xZkqqHx_iDfCiDiBiDjDiDgHiNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPreInitFile::OnChangeItlEdtTemplatePath ()
{
	// _xZkqqHx_jBkOjAkLiCmJjFmPiNfIiCkKiCkAiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
	UpdateModified();

//----- 06.02.24 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	WString	str;
//	FFGetDlgItemText(this, IDC_ITL_EDT_TEMPLATE_PATH, str);
//	WString strFile;
//	g_pReg->GetStdTemplate(strFile);
//	if (str == strFile) SetModified(FALSE);
//	else SetModified(TRUE);
//----- 06.02.24 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
} // CFCPreInitFile::OnChangeItlEdtTemplatePath.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPreInitFile::OnChangeItlEdtKeyMapPath
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDeMiBfLiDhNiDgCiDhGiDhEiDeAiDeDiDiLjGlMiDeHiDgGiDeCiDgCiDgHiCkKjFmPiNfIiClDiCoKiClNiOjOiOmAiNhDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.07.21 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPreInitFile::OnChangeItlEdtKeyMapPath ()
{
	// _xZkqqHx_jBkOjAkLiCmJjFmPiNfIiCkKiCkAiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
	UpdateModified();
//----- 06.02.24 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	WString	str;
//	FFGetDlgItemText(this, IDC_ITL_EDT_KEY_MAP_PATH, str);
//	WString strFile;
//	g_pReg->GetHandsTableFile(strFile);
//	if (str == strFile) SetModified(FALSE);
//	else SetModified(TRUE);
//----- 06.02.24 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
} // CFCPreInitFile::OnChangeItlEdtKeyMapPath.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPreInitFile::OnItlBtnKeyMapPath
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDeMiBfLiDhNiDgCiDhGiOfBiPmGiDhLiDfOiDjDiCkJiCoHiOmAiNhDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.07.21 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPreInitFile::OnItlBtnKeyMapPath ()
{
	// _xZkqqHx_iDeMiBfLiDhNiDgCiDhGiDhEiDeAiDeDiDiLjGlMiCpAiOoGjDlOiBeC_xHqqkZx_
	WString strFile;
	(void)g_pReg->GetHandsTableFile(strFile);
	if (strFile.IsEmpty())
	{
		// EXE_xZkqqHx_iDiCiDfHiDiFiBfLiDiLiCmMiDhEiDeAiDeDiDiLjGlMiCpAiOoGjDlOiBeC_xHqqkZx_
//----- 01.12.09 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//		::GetModuleFileName(NULL, strFile.GetBuffer(_MAX_PATH * sizeof(_TCHAR)), _MAX_PATH);
//		strFile.ReleaseBuffer();
//----- 01.12.09 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
		strFile = FFGetMolipExePath();
//----- 01.12.09 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
	}
	// _xZkqqHx_iDhEiDeAiDeDiDiLiDhAiDfIjGlMiCkJiCoHiDhAiDfIjFjEjFkKiCpAjFkKjHkDiClHiCoJiBeC_xHqqkZx_
//----- 03.12.07 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	WString strDirPath;
//	::FFSplitFileName(&strDirPath, NULL, NULL, strFile);
//	strDirPath += L"*.keytxt";
//----- 03.12.07 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	WString strDirPath = FFGetFileDirectory(strFile) + L"*.keytxt";
//----- 03.12.07 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
//----- 03.04.19 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	CFileDialog dlgFile(TRUE, _T(".keytxt"), WStrToTStr(strDirPath),
//						OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_NOCHANGEDIR,
//						_T("Key map Files (*.keytxt)|*.keytxt||"));
//----- 03.04.19 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	FCFileDialogBase dlgFile(TRUE, NULL, strDirPath,
							OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_NOCHANGEDIR,
							L"Key map Files (*.keytxt)|*.keytxt||");
//----- 03.04.19 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
	// _xZkqqHx_iDhHiDiLiDhGiDhLiDfOiDjDiCpAiPmBiLiOiBeC_xHqqkZx_
	dlgFile.m_ofn.Flags &= ~OFN_SHOWHELP;
//----- 01.07.21 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	// _xZkqqHx_iDfOiDeDiDgHiDiLjGlMiCmMjAnNjCoIiBeC_xHqqkZx_
//	// IDS_MSG_OPEN_TEMPLATE = "_xZkqqHx_iDeMiBfLiDhNiDgCiDhGiDhEiDeAiDeDiDiLiCpAiKeKiCkN_xHqqkZx_"
//	dlgFile.m_ofn.lpstrTitle = GetResWString(IDS_MSG_OPEN_TEMPLATE);
//----- 01.07.21 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
	if (dlgFile.DoModal() == IDOK)
	{
		FFSetDlgItemText(this, IDC_ITL_EDT_KEY_MAP_PATH, dlgFile.GetPathName());
		// _xZkqqHx_jBkOjAkLiCmJjFmPiNfIiCkKiCkAiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
		UpdateModified();
	}
} // CFCPreInitFile::OnItlBtnKeyMapPath.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPreInitFile::OnItlChkOpenUnknown
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFiLeOjDkOiOjOiCmJjAfGiLeLjFlGiPjBiCpAiKeKiCkNiCkJiBhGiDgAiDeGiDgCiDeOiDhLiDfOiDjDiCkJiCoHiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.02.24 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPreInitFile::OnItlChkOpenUnknown ()
{
	// _xZkqqHx_jBkOjAkLiCmJjFmPiNfIiCkKiCkAiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
	UpdateModified();
} // CFCPreInitFile::OnItlChkOpenUnknown.

