// PrePlugIn.cpp : _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_
//

#include "stdafx.h"
// 03.05.03 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//#include <map>				// For map template.
#include "DynamicDraw.h"
// 03.07.08 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//#include "../MolipSDK/MpgMolipExport.h"	// For DYNAMIC_DRAW_CLSID_TSTR.
#include "UtilMisc.h"			// For FFLoadRegString.
#include "UtilDlg.h"		// For SetUnitString.etc.
#include "UtilStr.h"		// For FFAppendString.
#include "UtilVersion.h"	// For FCHeaderInf.
#include "UtilWin.h"		// For FFInsertColumn.
#include "RegData.h"		// For FCRegData.
#include "PrePlugIn.h"		// This header.

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

/////////////////////////////////////////////////////////////////////////////
// CFCPrePlugIn _xZkqqHx_iDhGiDiNiDhAiDgFiDeC_xHqqkZx_ _xZkqqHx_iDhJiBfLiDfH_xHqqkZx_

IMPLEMENT_DYNCREATE(CFCPrePlugIn, CFCPropertyPageBase)

CFCPrePlugIn::CFCPrePlugIn () : BASE_CLASS(CFCPrePlugIn::IDD)
{
	//{{AFX_DATA_INIT(CFCPrePlugIn)
	//}}AFX_DATA_INIT

	m_bIsReady = FALSE;	// OnInitDialog_xZkqqHx_iOmAiNhDiMoDiCmJ_xHqqkZx_TRUE_xZkqqHx_iBeC_xHqqkZx_
} // CFCPrePlugIn::CFCPrePlugIn.

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

void CFCPrePlugIn::DoDataExchange(CDataExchange* pDX)
{
	BASE_CLASS::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CFCPrePlugIn)
	//}}AFX_DATA_MAP
} // CFCPrePlugIn::DoDataExchange.

BEGIN_MESSAGE_MAP(CFCPrePlugIn, BASE_CLASS)
	//{{AFX_MSG_MAP(CFCPrePlugIn)
	ON_COMMAND(ID_DIALOG_INIT_VALUE, OnDialogInitValue)
	ON_NOTIFY(NM_CLICK, IDC_PGN_LSV_PLUG_IN_LIST, OnClickPgnLsvPlugInList)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFCPrePlugIn _xZkqqHx_iDiGiBfLiDfFiKnGjAjEiBeC_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrePlugIn::IsConsistent
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jCgMiCkKjAlDiClFiCkNjAnNjCoIiClDiCoKiCmEiCkCiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	TRUE	:_xZkqqHx_jCgMiCkKjAlDiClFiCkCiPoKiNiHiBeC_xHqqkZx_
 *			FALSE	:_xZkqqHx_jCgMiCkKjAlDiClFiCkNiCmIiCkCiPoKiNiHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.09.28 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CFCPrePlugIn::IsConsistent () const
{
	if (m_tstPlugInOn == NoValue) return FALSE;
	return TRUE;
} // CFCPrePlugIn::IsConsistent.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrePlugIn::UpdateModified
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jBkOjAkLiCmJjFmPiNfIiCkKiCkAiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiBeBiIoKiCmCiCmFiCoAjFmPiNfIiCkKiCkAiCoKiCmOiPeDjAlDiDhEiDiJiDeP_xHqqkZx_
 *			_xZkqqHx_iCpAjAnNjCoIiClHiCoJiBeCiIoKiCmCiCoAjFmPiNfIiCkKiCmIiCkPiCoKiCmOiPeDjAlDiDhEiDiJiDePiCpAiJpAiPjMiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.09.28 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrePlugIn::UpdateModified ()
{
	// _xZkqqHx_iJlNiCkJiPiIjHjNjCiGiCmIiCoHiCmOjBkGiOjOjFjMiLeBiBeC_xHqqkZx_
	if (!m_bIsReady) return;
	if (!IsConsistent())
	{
		SetModified(FALSE);
		return;
	}
	BOOL bModified = FALSE;
	if (m_tstPlugInOn.IsChanged()) bModified = TRUE;
	SetModified(bModified);
} // CFCPrePlugIn::UpdateModified.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrePlugIn::UpdateControls
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFmPjAjEiCmMiPpDjBnEiCpAiDfCiDjDiDgHiDiNiBfLiDiLiCnGjElNiJgGiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dwCtrl	:_xZkqqHx_iClBiCmMiKnGjAjEiCmMiMmEiCnBiPgPiClFiMlDiCmMiDfCiDjDiDgHiDiNiBfLiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jCiNiInD_xHqqkZx_>	dwCtrl_xZkqqHx_iCkKiDeHiDgGiDeCiDgCiDgHiDfCiDjDiDgHiDiNiBfLiDiLiCmMiOjOiCmNiBeBiClLiCmMiDfCiDjDiDgHiDiNiBfLiDiLiCmJ_xHqqkZx_
 *			_xZkqqHx_jCgMiCpAjAnNjCoIiClHiCoJiCmGiDfCiDjDiDgHiDiNiBfLiDiLjBfDjBmMiCkKjBeJjBpAiPpDjBnEiCmJiCmIiCmBiCmEiClFiCnMiCkEiClNiCnPiBeB_xHqqkZx_
 *			_xZkqqHx_iClLiCmMiDfCiDjDiDgHiDiNiBfLiDiLiCnGiCmMjCgMiCmMjAnNjCoIiCmNiNhDiCoNiCmIiCkCiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.09.28 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrePlugIn::UpdateControls (DWORD dwCtrl)
{
	// _xZkqqHx_iJlNiCkJiPiIjHjNjCiGiCmIiCoHiCmOjBkGiOjOjFjMiLeBiBeC_xHqqkZx_
	if (!m_bIsReady) return;
	m_bIsReady = FALSE;

	//----- _xZkqqHx_iDiKiDfIiDgHiDfCiDjDiDgHiDiNiBfLiDiLiCmMiDgAiDeGiDgCiDeOiDeBiDeDiDfCiDjDiCpAiDgGiBfLiDfOiCmJiNiHiCoNiClJiCoJ_xHqqkZx_ -----
	CListCtrl* pList = (CListCtrl*)GetDlgItem(IDC_PGN_LSV_PLUG_IN_LIST);
	for (int iC = 0; iC != pList->GetItemCount(); iC++)
	{
		//----- _xZkqqHx_iDiKiDfIiDgHiDfCiDjDiDgHiDiNiBfLiDiLiCmMiCfCjEnEjGnKiDeKiDiJiDiAiCmMjFlGiOjKjHpBiCpAiOoGjDlO_xHqqkZx_ -----
		_TCHAR tcsName[256];
		LV_ITEM lvitem;
		lvitem.mask = LVIF_TEXT;
		lvitem.iItem = iC;
		lvitem.iSubItem = 2;
		lvitem.pszText = tcsName;
		lvitem.cchTextMax = sizeof(tcsName);
		pList->GetItem(&lvitem);

		//----- _xZkqqHx_iCfCjEnEjGnKiDeKiDiJiDiAjFlGiOjKjHpBiCkJiCoHiBeBiClBiCmMiDeBiDeDiDgFiDiAiCmMiDgAiDeGiDgCiDeOiPpDjBnEiCpAjAnNjCoI_xHqqkZx_ -----
		BOOL bOn = m_tstPlugInOn.Get().find(TStrToWStr(tcsName)) != m_tstPlugInOn.Get().end();
		lvitem.mask = LVIF_IMAGE;
		lvitem.iItem = iC;
		lvitem.iSubItem = 0;
		lvitem.iImage = bOn ? 1 : 0;
		pList->SetItem(&lvitem);
	}

	m_bIsReady = TRUE;
} // CFCPrePlugIn::UpdateControls.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrePlugIn::UpdateActivate
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iKgFjBkOjAkLiCmMjHeMiMpIiBeFjGlDiMpIiCpAjClCiCnHiBeBjHeMiMpIiPpDjBnEjFmPjAjEiCpAiNfIjAfGiClFiClNiMoD_xHqqkZx_
 *			_xZkqqHx_iDfCiDjDiDgHiDiNiBfLiDiLiCmMjFfMiOkGiCpAjFmPiNfIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.09.28 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrePlugIn::UpdateActivate ()
{
//----- 01.05.22 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	if (((CListBox*)GetDlgItem(IDC_PGN_LST_FILES))->GetCurSel() == LB_ERR ||
//		m_tstrCLSIDList == NoValue || m_tstrCLSIDList.Get().IsEmpty())
//		GetDlgItem(IDC_PGN_BTN_DELETE)->EnableWindow(FALSE);
//	else
//		GetDlgItem(IDC_PGN_BTN_DELETE)->EnableWindow(TRUE);
//----- 01.05.22 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
} // CFCPrePlugIn::UpdateActivate.

/////////////////////////////////////////////////////////////////////////////
// CFCPrePlugIn _xZkqqHx_iDiBiDgCiDfKiBfLiDfH_xHqqkZx_ _xZkqqHx_iDgOiDjDiDgIiDiJ_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrePlugIn::OnDialogInitValue
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	ID_DIALOG_INIT_VALUE_xZkqqHx_iDfCiDhNiDjDiDgIiCmFiOmAiNhDiBeCiKgFjBkOjAkLjCgMiCmMjFmPjAjEiCpAiPiJiKpKiJlLiClFiBeB_xHqqkZx_
 *			_xZkqqHx_iDfCiDjDiDgHiDiNiBfLiDiLiCpAiPiJiKpKiJlLiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.09.28 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrePlugIn::OnDialogInitValue ()
{
	//----- _xZkqqHx_iDeBiDeOiDgFiDeCiDhFiCmIiDhGiDiJiDePiDeDiDjDiCmM_xHqqkZx_CLSID_xZkqqHx_iDiKiDfIiDgHiCpAiOoGjDlO_xHqqkZx_ -----
//----- 01.08.09 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	CString strCLSID;
//	g_pReg->GetPlugInClsid(strCLSID);
//	m_tstrCLSIDList.Init(strCLSID);
//	//----- _xZkqqHx_iDhGiDiJiDePiDeDiDjDiCmMiDeBiDeOiDgFiDeCiDhFiPpDjBnEiCpAiBeB_xHqqkZx_m_mpPlugInCheck_xZkqqHx_iCmJjAnNjCoI_xHqqkZx_ -----
//	CString strCLSIDList = m_tstrCLSIDList;
//	while (!strCLSIDList.IsEmpty())
//	{
//		CString strCLSID;
//		// _xZkqqHx_jFlGiOjKiDgGiBfLiDfOiBgJ_xHqqkZx_CLSID_xZkqqHx_iBgKiCpAiOoGiCoIiPgPiClHiBeC_xHqqkZx_
//		FFExtractString(strCLSID, strCLSIDList);
//		// CLSID_xZkqqHx_iCmMiDeBiDeOiDgFiDeCiDhFiCpAjAnNjCoIiBeC_xHqqkZx_
//		m_mpPlugInCheck[(const _TCHAR*)strCLSID] = TRUE;
//	}
//----- 01.08.09 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	m_tstPlugInOn.GetValue().clear();
	// _xZkqqHx_iDiMiDfHiDfIiDgHiDiKiCkJiCoHiDhGiDiJiDePiDeDiDjDiDiCiDfHiDiFiBfLiDiLjGlMiCpAiOoGjDlOiBeC_xHqqkZx_
	map<WString, WString> mpNameToValue;
	g_pReg->GetPlugInClsidValue(mpNameToValue);
	map<WString, WString>::const_iterator iNv;
	for (iNv = mpNameToValue.begin(); iNv != mpNameToValue.end(); iNv++)
	{
		m_tstPlugInOn.GetValue().insert((*iNv).first.c_str());
	}
	m_tstPlugInOn.Init();
//----- 01.08.09 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
	// _xZkqqHx_jFmPjAjEiCmMjCgMiCpAiDfCiDjDiDgHiDiNiBfLiDiLiCnGjElNiJgGiBeC_xHqqkZx_
	UpdateControls(0);
	// _xZkqqHx_iDfCiDjDiDgHiDiNiBfLiDiLiCmMjHeMiMpIiBeFjGlDiMpIiCpAjAnNjCoIiBeC_xHqqkZx_
	UpdateActivate();
	// _xZkqqHx_jBkOjAkLiCmJjFmPiNfIiCkKiCkAiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
	UpdateModified();
} // CFCPrePlugIn::OnDialogInitValue.

/////////////////////////////////////////////////////////////////////////////
// CFCPrePlugIn _xZkqqHx_iDiBiDgCiDfKiBfLiDfH_xHqqkZx_ _xZkqqHx_iDgOiDjDiDgIiDiJ_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrePlugIn::OnInitDialog
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfPiDeDiDeBiDiNiDePiPiJiKpKiJlLiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.09.28 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CFCPrePlugIn::OnInitDialog ()
{
	// Superclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnInitDialog();
	m_bIsReady = TRUE;

	//----- _xZkqqHx_iDiKiDfIiDgHiDfCiDjDiDgHiDiNiBfLiDiLiCmMiPiJiKpKiJlL_xHqqkZx_ -----
	m_imageList.Create(16, 16, ILC_MASK, 4, 4);
	m_imageList.Add(FFGetApp()->LoadIcon(IDI_CHECK_UNMARKED));		// Image 0.
	m_imageList.Add(FFGetApp()->LoadIcon(IDI_CHECK_MARKED));		// Image 1.
	CListCtrl* pList = (CListCtrl*)GetDlgItem(IDC_PGN_LSV_PLUG_IN_LIST);
	// _xZkqqHx_jBfDiNhDjBeJjBpAiDhNiBfLiDeOiCkKjFfMiOkGiClDiCoKiCoJiCoGiCkEiCmJiDfIiDfOiDeDiDiLjFmPiNfIiBeC_xHqqkZx_
	pList->SetExtendedStyle(pList->GetExtendedStyle()|LVS_EX_FULLROWSELECT);
	// _xZkqqHx_iDeBiDeDiDfCiDjDjFfMiOkGjHhAiDeDiDiBiBfLiDfHiDiKiDfIiDgHiCpAjAnNjCoIiBeC_xHqqkZx_
	pList->SetImageList(&m_imageList, LVSIL_SMALL);

	//----- _xZkqqHx_iDiKiDfIiDgHiDfCiDjDiDgHiDiNiBfLiDiLiCmJiDeKiDiJiDiAiCpAiCfCiCmCjBhNjDpM_xHqqkZx_ -----
	CRect rtClient;
	pList->GetClientRect(rtClient);
	// _xZkqqHx_iDgAiDeGiDgCiDeOiDhNiBfLiDeOiCmMiDeKiDiJiDiAiCpAjBhNjDpMiBeC_xHqqkZx_
	FFInsertColumn(pList, 0, L"", LVCFMT_LEFT, 20);
	// _xZkqqHx_iDhGiDiJiDePiDeDiDjDjGlMiCmMiDeKiDiJiDiAiCpAjBhNjDpMiBeC_xHqqkZx_
	FFInsertColumn(pList, 1, L"", LVCFMT_LEFT, rtClient.Width() - 20);
	// _xZkqqHx_iDhGiDiJiDePiDeDiDjDiCmM_xHqqkZx_CLSID_xZkqqHx_iCmMiDeKiDiJiDiAiCpAjBhNjDpMiBeCiJeCiClFiDeKiDiJiDiAiBeC_xHqqkZx_
	FFInsertColumn(pList, 2, L"", LVCFMT_LEFT, 0);

	//----- _xZkqqHx_iClBiCmMiDhNiDfGiDjDiCmJiDeDiDjDiDfIiDgHiBfLiDiLiClDiCoKiCmEiCkCiCoJ_xHqqkZx_DynamicDraw_xZkqqHx_jHhAiDhGiDiJiDePiDeDiDjDiIoKjHjHiCpAiOoGjDlO_xHqqkZx_ -----
	//----- _xZkqqHx_iDiMiDfHiDfIiDgHiDiKjGlMiCpAiNoMjAkM_xHqqkZx_ -----
	WString strRegVarKey;
	strRegVarKey.Format(L"CLSID\\%s\\PlugIn%s", DYNAMIC_DRAW_CLSID_WSTR,
								(const wchar_t*)FCHeaderInf::GetStcAppMajorMinorString());
	HKEY hKey;
	// KEY_ENUMERATE_SUB_KEYS_xZkqqHx_iCpAjGfJiCoKiCoJiCmG_xHqqkZx_NT_xZkqqHx_iCmF_xHqqkZx_RegEnumKeyEx_xZkqqHx_iCkKjDkOiNoMiClFiCmIiCkCiBeC_xHqqkZx_
	if (RegOpenKeyEx(HKEY_CLASSES_ROOT, WStrToTStr(strRegVarKey), 0L,
					 KEY_ENUMERATE_SUB_KEYS|KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS)
	{
		// _xZkqqHx_jHeMiMpIiCmIiDhGiDiJiDePiDeDiDjDiCmMiDeKiDeFiDjDiDgHiBeC_xHqqkZx_
		long lIndex = 0;
		for (DWORD dwIdx = 0; ;dwIdx++)
		{
			// RegEnumKeyEx_xZkqqHx_iKnGjAjEiCmFiBeBiOhHjCoIiCmMiDiMiDfHiDfIiDgHiDiKiImIiJlKiCmMiDiKiDfIiDgHiCpAiOoGjDlOiBeC_xHqqkZx_
			_TCHAR tcsClsid[256];
			DWORD dwName = sizeof(tcsClsid) / sizeof(tcsClsid[0]);
			if (RegEnumKeyEx(hKey, dwIdx, tcsClsid, &dwName, 0,
							 NULL, NULL, NULL) != ERROR_SUCCESS) break;

			// _xZkqqHx_iOhHjCoIiCmMiDhGiDiJiDePiDeDiDjDiCmMiDiCiDfHiDiFiBfLiDiLjGlMiCpAiOoGjDlOiBeC_xHqqkZx_
			WString strRegKeyName;
			strRegKeyName.Format(L"%s\\%s", strRegVarKey.c_str(), (const wchar_t*)TStrToWStr(tcsClsid));
			// _xZkqqHx_jBmOiJjOiDeBiDhGiDiKiCpAiOoGjDlOiBeC_xHqqkZx_
			DWORD dwAppMode;
			if (FFLoadRegDWORD(dwAppMode, HKEY_CLASSES_ROOT, strRegKeyName, L"AppMode"))
			//----- _xZkqqHx_iOoGjDlOiCmFiCkLiClNiPoKiNiH_xHqqkZx_ -----
			{
				// _xZkqqHx_iMlLiNnNiCmMiDeBiDhGiDiKiCmJjBmOiJjOiClFiCmEiCkCiCoJiPoKiNiHiCmMiCnNjAnNjCoIiBeC_xHqqkZx_
				if (g_->appMode & dwAppMode)
				{
					WString wstrName;
					if (FFLoadRegString(wstrName, HKEY_CLASSES_ROOT,
										strRegKeyName, L"ModuleName"))
					//----- _xZkqqHx_iDhGiDiJiDePiDeDiDjDiDiCiDfHiDiFiBfLiDiLjGlMiCpAiOoGjDlOiCmFiCkLiClNiPoKiNiH_xHqqkZx_ -----
					{
						m_stPlugInAll.insert(TStrToWStr(tcsClsid));
						//----- _xZkqqHx_iDiKiDfIiDgHiDfCiDjDiDgHiDiNiBfLiDiLiCmJiDeBiDeDiDgFiDiAiCpAjBhNjDpM_xHqqkZx_ -----
						CString strName = WStrToTStr(wstrName);
						// _xZkqqHx_iDeBiDeDiDgFiDiAjBhNjDpMiBeCiDeKiDiJiDiAiCePiCmMiDeBiDeDiDfCiDjDiCpAjAnNjCoIiBeC_xHqqkZx_
						LV_ITEM lvitem;
						lvitem.mask = LVIF_IMAGE;
						lvitem.iItem = lIndex;
						lvitem.iSubItem = 0;
						lvitem.iImage = 0;		// _xZkqqHx_jEpBjBeJjBpAiCmMiDgAiDeGiDgCiDeOiDhNiBfLiDeOiBeC_xHqqkZx_
						pList->InsertItem(&lvitem);
						// _xZkqqHx_iDeBiDeDiDgFiDiAiCmMiDeKiDiJiDiAiCfAiDgFiDeMiDfIiDgHiCpAjAnNjCoIiBeC_xHqqkZx_
						lvitem.mask = LVIF_TEXT;
						lvitem.iItem = lIndex;
						lvitem.iSubItem = 1;
						lvitem.pszText = (_TCHAR*)(const _TCHAR*)strName;
						pList->SetItem(&lvitem);
						// _xZkqqHx_iDeBiDeDiDgFiDiAiCmMiDeKiDiJiDiAiCfBiDgFiDeMiDfIiDgHiCpAjAnNjCoIiBeC_xHqqkZx_GUID_xZkqqHx_iBeCiJeCiClFiDeKiDiJiDiAiBeC_xHqqkZx_
						lvitem.mask = LVIF_TEXT;
						lvitem.iItem = lIndex;
						lvitem.iSubItem = 2;
						lvitem.pszText = tcsClsid;
						pList->SetItem(&lvitem);
						// _xZkqqHx_iDhGiDiJiDePiDeDiDjDiDeDiDjDiDgGiDgCiDeOiDfIiCpAiJmBiOfKiBeC_xHqqkZx_
						lIndex++;
					}
				}
			}
		}
		RegCloseKey(hKey);
	}

	// _xZkqqHx_iDfPiDeDiDeBiDiNiDePiCmMjCfAiImKjFfMiOkGiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
	::SetUnitString(m_hWnd);
	// _xZkqqHx_jHjIiCkLjIhCjBmOiJjOjFlGiOjKjHpBiCmMjAnNjCoIiCpAiNhDiCkEiBeC_xHqqkZx_
	::RightByLeftHand(m_hWnd);
	// _xZkqqHx_jBkOjAkLjFmPjAjEiCmMiPiJiKpKiJlLiBeC_xHqqkZx_
	PostMessage(WM_COMMAND, ID_DIALOG_INIT_VALUE);
	return TRUE;  // _xZkqqHx_iDfCiDjDiDgHiDiNiBfLiDiLiCmJiDhEiDeIiBfLiDeKiDfIiCpAjAnNjCoIiClFiCmIiCkCiCmGiCkLiBeBjGnPiCoIjCgMiCmN_xHqqkZx_ TRUE _xZkqqHx_iCmGiCmIiCoIiCnMiClH_xHqqkZx_
	              // _xZkqqHx_jHoBiKeP_xHqqkZx_: OCX _xZkqqHx_iDhGiDiNiDhAiDgFiDeC_xHqqkZx_ _xZkqqHx_iDhJiBfLiDfHiCmMjGnPiCoIjCgMiCmN_xHqqkZx_ FALSE _xZkqqHx_iCmGiCmIiCoIiCnMiClH_xHqqkZx_
} // CFCPrePlugIn::OnInitDialog.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrePlugIn::OnOK
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	OK_xZkqqHx_iDhLiDfOiDjDiBeBjDeLjHhAiDhLiDfOiDjDiCkJiCoHiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.09.28 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrePlugIn::OnOK ()
{
	//-----	_xZkqqHx_jBkOjAkLiCmJjGlFiPiCiCkKiCkAiCoJiPoKiNiHiCmNiBeBjFjEjFgJiCmJjBkOjAkLiCpAjAnNjCoIiClJiClIiCmJjFjMiLeB_xHqqkZx_ -----
	if (!IsConsistent())
	{
		BASE_CLASS::OnOK();
		return;
	}
//----- 01.08.09 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	if (m_tstrCLSIDList.IsChanged())
//	{
//		//----- _xZkqqHx_iKgFiOoNjBkOjAkLiCmMjAnNjCoI_xHqqkZx_ -----
//		g_pReg->SetPlugInClsid(m_tstrCLSIDList.Get());
//	}
//----- 01.08.09 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	if (m_tstPlugInOn.IsChanged())
	{
		WStringSet::const_iterator iPi;
		for (iPi = m_stPlugInAll.begin(); iPi != m_stPlugInAll.end(); iPi++)
		{
			//----- _xZkqqHx_jBkOjAkLiCmMjAnNjCoI_xHqqkZx_ -----
			if (m_tstPlugInOn.Get().find((*iPi).c_str()) != m_tstPlugInOn.Get().end())
				g_pReg->SetPlugInClsidValue((*iPi).c_str(), L"+");
			else
				g_pReg->SetPlugInClsidValue((*iPi).c_str(), NULL);
		}
	}
//----- 01.08.09 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----

	// _xZkqqHx_jBkOjAkLjFmPjAjEiCmMiPiJiKpKiJlLiBeC_xHqqkZx_
	PostMessage(WM_COMMAND, ID_DIALOG_INIT_VALUE);
	// Superclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnOK();
} // CFCPrePlugIn::OnOK.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCPrePlugIn::OnClickPgnLsvPlugInList
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhGiDiJiDePiDeDiDjDiCmMiDiKiDfIiDgHiDeBiDeDiDgFiDiAiCkKiDeOiDiKiDgCiDeOiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.05.21 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCPrePlugIn::OnClickPgnLsvPlugInList (NMHDR* pNMHDR, LRESULT* pResult)
{
	NMITEMACTIVATE* pItem = (NMITEMACTIVATE*)pNMHDR;
	if (pItem->iSubItem == 0)
	//----- _xZkqqHx_iDgAiDeGiDgCiDeOiDhNiBfLiDeOiCmMiDeKiDiJiDiAiCkKiDeOiDiKiDgCiDeOiClDiCoKiClNiPoKiNiH_xHqqkZx_ -----
	{
		CListCtrl* pList = (CListCtrl*)GetDlgItem(IDC_PGN_LSV_PLUG_IN_LIST);
		//----- _xZkqqHx_iCfCjEnEjGnKiDeKiDiJiDiAiCkJiCoHiBeB_xHqqkZx_CLSID_xZkqqHx_iCpAiOoGjDlO_xHqqkZx_ -----
		_TCHAR tcsClsid[256];
		LV_ITEM lvitem;
		lvitem.mask = LVIF_TEXT;
		lvitem.iItem = pItem->iItem;
		lvitem.iSubItem = 2;
		lvitem.pszText = tcsClsid;
		lvitem.cchTextMax = sizeof(tcsClsid);
		pList->GetItem(&lvitem);

		// _xZkqqHx_iDhGiDiJiDePiDeDiDjDiBgJ_xHqqkZx_CLSID_xZkqqHx_iCmFjDmBjCoIiBgKiCmMjBeJjBpAiPpDjBnEiCpAjElNjDfNiBeC_xHqqkZx_
		WStringSet stPlugInOn = m_tstPlugInOn.Get();
		WStringSet::iterator iPi = stPlugInOn.find(TStrToWStr(tcsClsid));
		if (iPi != stPlugInOn.end())
			stPlugInOn.erase(iPi);
		else
			stPlugInOn.insert(TStrToWStr(tcsClsid));
		// _xZkqqHx_jCgMiCpAjAnNjCoIiBeC_xHqqkZx_
		m_tstPlugInOn = stPlugInOn;
		// _xZkqqHx_jFmPjAjEiCmMjCgMiCpAiDfCiDjDiDgHiDiNiBfLiDiLiCnGjElNiJgGiBeC_xHqqkZx_
		UpdateControls(IDC_PGN_LSV_PLUG_IN_LIST);
		// _xZkqqHx_iDfCiDjDiDgHiDiNiBfLiDiLiCmMjHeMiMpIiBeFjGlDiMpIiCpAjAnNjCoIiBeC_xHqqkZx_
		UpdateActivate();
		// _xZkqqHx_jBkOjAkLiCmJjFmPiNfIiCkKiCkAiCoJiCkJiCmHiCkEiCkJiCpAjClCiCnHiCoJiBeC_xHqqkZx_
		UpdateModified();
	}
	*pResult = 0;
} // CFCPrePlugIn::OnClickPgnLsvPlugInList.
