// PgTextPaste.cpp : DLL _xZkqqHx_iDeBiDhGiDiKiDfAiBfLiDfGiDiHiDjDjHhAiCmMiDeHiDjDiDgHiDiK_xHqqkZx_ _xZkqqHx_iDhMiDeDiDjDiDgHiCpAjCoIiLgAiClFiCnMiClHiBeC_xHqqkZx_
//

#include "stdafx.h"
#include <tchar.h>				// For _TCHAR.
#include "resource.h"			// For IDD_DLG_CONTROL.
#include "Module.h"				// For FMpgGetModule().
#include "PgGradater.h"			// This header.

// _xZkqqHx_iDhGiDiJiDePiDeDiDjDiDfCiDjDiDhMiBfLiDgMiDjDiDgHiCmM_xHqqkZx_CLSID_xZkqqHx_iBeC_xHqqkZx_
// _xZkqqHx_iDhGiDiJiDePiDeDiDjDiDfCiDjDiDhMiBfLiDgMiDjDiDgHiClCiCmGiCmJiMmFjHeMiCmM_xHqqkZx_CLSID_xZkqqHx_iCkKjFeLjHhGiCmFiClHiBeC_xHqqkZx_
// {24044328-12A6-4169-AD27-F330C2FF9412}
static const GUID PG_COMPONENT_1_CLSID = { 0x24044328, 0x12a6, 0x4169, { 0xad, 0x27, 0xf3, 0x30, 0xc2, 0xff, 0x94, 0x12 } };

#define HID_BASE_RESOURCE   0x00020000UL	// For Help HID_XXX.

static const wchar_t* PG_WCPCOMPONENT_VERSION = L"4.0";

#ifdef PG_JP // _xZkqqHx_jDpKjGhLiMoKiCmMiPoKiNiHiBeC_xHqqkZx_
#include "JP.DATA"
#else//PG_JP // _xZkqqHx_jDpKjGhLiMoKiImIiKePiCmMiPoKiNiHiBeC_xHqqkZx_
#include "ENG.DATA"
#endif//PG_JP

static const wchar_t* PG_COLOR_NAME = L"Gradater";
static const int PG_COLOR_NAME_LEN = wcslen(PG_COLOR_NAME);

static const wchar_t PG_MENU_SHORTCUT[] =
{
	L'G',
	L'S',
	L'B',
	L'A',
};

//---- _xZkqqHx_iDgGiDhEiDeIiDiLiDgHjCgM_xHqqkZx_ -----
const short		DEFAULT_CREATE_OBJ_COUNT = 5;
const long		DEFAULT_DISTANCE_POWER = 100;
const long		DEFAULT_COLOR_POWER = 100;
const short		DEFAULT_IS_ONLY_GNAME_COLOR = TRUE;
const short		DEFAULT_IS_USE_NEAR_COLOR = TRUE;
const short		DEFAULT_IS_GROUP = TRUE;

//---- _xZkqqHx_iNmFjCoBiBeFiNmFjBoFjCgM_xHqqkZx_ -----
const short		MIN_CREATE_OBJ_COUNT = 1;
const short		MAX_CREATE_OBJ_COUNT = 99;
const long		MIN_DISTANCE_POWER = 5;
const long		MAX_DISTANCE_POWER = 2000;
const long		MIN_COLOR_POWER = 5;
const long		MAX_COLOR_POWER = 2000;

#define D2L(a)  (0 < (a) ? (long)((a) + 0.5) : (long)((a) - 0.4))

/////////////////////////////////////////////////////////////////////////////////

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetComponentCLSID
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDhMiBfLiDgMiDjDiDgHiCmM_xHqqkZx_CLSID_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	CLSID_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.03.17 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
const GUID& CA::GetComponentCLSID () const
{
	return PG_COMPONENT_1_CLSID;
} // CA::GetComponentCLSID.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetAuthorName
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDhMiBfLiDgMiDjDiDgHiCmMiNoMiOnCjGlMiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDhMiBfLiDgMiDjDiDgHiCmMiNoMiOnCjGlMiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.12.09 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
const wchar_t* CA::GetAuthorName () const
{
	return PG_AUTHOR_NAME;
} // CA::GetAuthorName.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetComponentName
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiCiDfHiDiFiBfLiDiLjGlMiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDiCiDfHiDiFiBfLiDiLjGlMjFlGiOjKjHpBiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDiCiDfHiDiFiBfLiDiLjGlMiCmNiBeBiDiBiDgKiDiFiBfLiCmMiDfEiDhFiDiBiDgKiDiFiBfLjGlMiCmIiCmHiCmFiOgHiCoNiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jCiNiInD_xHqqkZx_>	_xZkqqHx_iMlOiMoKiDfCiBfLiDgIiCmJjCiNiInDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
const wchar_t* CA::GetComponentName () const
{
	return PG_COMPONENT_NAME;
} // CA::GetComponentName.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetVersionName
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgPiBfLiDfHiDiHiDjDjGlMiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDgPiBfLiDfHiDiHiDjDjGlMjFlGiOjKjHpBiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
const wchar_t* CA::GetVersionName () const
{
	return PG_WCPCOMPONENT_VERSION;
} // CA::GetVersionName.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetComment
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iClBiCmMiDfCiDjDiDhMiBfLiDgFiDjDiDgHiCmMiJpAjAoAiDfCiDiBiDjDiDgHiCpAjFnEiClHiBeCjGlDiCkCiPoKiNiHiCmN_xHqqkZx_ NULL_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFlGiOjKjHpBiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
const wchar_t* CA::GetComment () const
{
	return PG_COMMENT;
} // CA::GetComment.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetComponentShortcut
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiCiDfHiDiFiBfLiDiLiCpAiDiBiDgKiDiFiBfLiCmJjDgPjIfOiClHiCoJiCmGiCkLiCmMiDfGiDiHiBfLiDgHiDeKiDgCiDgHiDeMiBfLiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDeMiBfLiDfCiBfLiDgIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClFiClNiDeMiBfLiCkKjFeLiClIjDgPjIfOiCmFiCkLiCoJiCoNiCkPiCmFiCmNiCmIiCkCiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
wchar_t CA::GetComponentShortcut () const
{
	return L'G';
} // CA::GetComponentShortcut.

/////////////////////////////////////////////////////////////////////////////////

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::Initialize
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiCiDfHiDiFiBfLiDiLiCpAiPiJiKpKiJlLiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pI	:Molip Draw_xZkqqHx_jBkEiCmMiDeDiDjDiDfOiDhEiDeGiBfLiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAkMiMpHiClFiClNiPoKiNiHiCmN_xHqqkZx_ S_OK_xZkqqHx_iBeBiOlIjEhDiClFiClNiPoKiNiHiCmNiDeHiDiJiBfLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
HRESULT CA::Initialize (IMpgMolipMain* pI)
{
	// Molip Draw_xZkqqHx_iCmMiDiBiDeDiDjDiDeDiDjDiDfOiDhEiDeGiBfLiDfIiCpAiOoGjDlOiBeC_xHqqkZx_
	if (FAILED(IMpgInterface::Initialize(pI))) return E_FAIL;
	// _xZkqqHx_iDiCiDfHiDiFiBfLiDiLiCkKiDfEiDhMiBfLiDgHiClHiCoJiDfCiDhNiDjDiDgIiCpAjDgPjIfOiBeC_xHqqkZx_
	for (int iC = 0; iC != sizeof(PG_MENU) / sizeof(PG_MENU[0]); iC++)
	{
		m_adwCommandId[iC] = GetMolipMainI()->RegisterCommand(TRUE, PG_MENU[iC], PG_MENU_SHORTCUT[iC]);
	}

	m_nCreateObjCount = -1;		// _xZkqqHx_jAfGiLeLjFjEjFgJiNoMjAkMjAjEiBeC_xHqqkZx_
	m_lDistancePower = -1;		// _xZkqqHx_jFjEjFgJiLjHjHkDiCmMiJmBjBkMjDhIiBeC_xHqqkZx_
	m_lColorPower = -1;			// _xZkqqHx_jFjEjFgJjAeGiCmMiJmBjBkMjDhIiBeC_xHqqkZx_
	m_nIsOnlyGnameColor = -1;	// _xZkqqHx_jAeGjGlMiBhF_xHqqkZx_Gradater_xZkqqHx_iBhGiCmMiCnNiOgHjHhAiBeC_xHqqkZx_
	m_nIsUseNearColor = -1;		// _xZkqqHx_iLnPiCkCjAeGiCpAjHkMjHhAiBeC_xHqqkZx_
	m_nIsGroup = -1;			// _xZkqqHx_jFjEjFgJiCpAiDePiDiLiBfLiDhGiJlLiBeC_xHqqkZx_

	return S_OK;
} // CA::Initialize.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::Terminate
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiCiDfHiDiFiBfLiDiLiCmMiPeJjHlJiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAkMiMpHiClFiClNiPoKiNiHiCmN_xHqqkZx_ S_OK_xZkqqHx_iBeBiOlIjEhDiClFiClNiPoKiNiHiCmNiDeHiDiJiBfLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
HRESULT CA::Terminate ()
{
	if (m_hwndDialog != NULL)
	//----- _xZkqqHx_iDfPiDeDiDeBiDiNiDePiCkKiNoMjAkMiNmPiCnNiCmMiPoKiNiH_xHqqkZx_ -----
	{
		::DestroyWindow(m_hwndDialog);
		m_hwndDialog = NULL;
	}
	// Molip Draw_xZkqqHx_iCmMiDiBiDeDiDjDiDeDiDjDiDfOiDhEiDeGiBfLiDfIiCpAiKeKjFpKiBeC_xHqqkZx_
	return IMpgInterface::Terminate();
} // CA::Terminate.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	myDialogProc
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDePiDiJiDgGiBfLiDfOiBfLjAkHiMoEiDhAiDgMiDiLiCmMjAkHiMoEiDfCiBfLiDiLiDgPiDgCiDeOiKnGjAjEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	hwndDlg	:_xZkqqHx_iDfPiDeDiDeBiDiNiDePiCmMiDgOiDjDiDgIiDiLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			uMsg	:_xZkqqHx_iDiBiDgCiDfKiBfLiDfH_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			wParam	:wParam_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			lParam	:lParam_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDiBiDgCiDfKiBfLiDfHiCkKiPiIjHjNiCmFiCkLiClNiPoKiNiHiCmN_xHqqkZx_ TRUE_xZkqqHx_iBeBiPiIjHjNiCmFiCkLiCmIiCkJiCmBiClNiPoKiNiHiCmN_xHqqkZx_
 *			FALSE_xZkqqHx_iBeC_xHqqkZx_FALSE_xZkqqHx_iCpAjFnEiClFiClNiPoKiNiHiCmNiDgGiDhEiDeIiDiLiDgHiPiIjHjNiCkKiNhDiCoNiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
static INT_PTR CALLBACK myDialogProc (	HWND hwndDlg,	// handle to dialog box
										UINT uMsg,		// message
										WPARAM wParam,	// first message parameter
										LPARAM lParam)	// second message parameter
{
	// CA_xZkqqHx_iDeOiDiJiDfIiCpAiLeMjIfOiBeCiDhNiDiLiDgAiDfIiDiMiDgCiDgIiBeBiDiCiBfLiDgIiDiMiDfIiDfPiDeDiDeBiDiNiDePiCmMiPoKiNiHiCmN_xHqqkZx_
	// _xZkqqHx_jBlNiPgEiCmJiLeOjDkOiClDiCoKiClNiPoKiNiHjBmOiJjOiCmFiCkLiCmIiCkCiClBiCmGiCmJjCiNiInDiBeC_xHqqkZx_
	static CA* pCA = NULL;

	switch (uMsg)
	{
	case WM_INITDIALOG:
	  {
		pCA = (CA*)lParam;

		// _xZkqqHx_jAfGiLeLiNoMjAkMjFjEjFgJjAjEiBeC_xHqqkZx_
		SetDlgItemInt(hwndDlg, IDC_EDT_CREATE_OBJ_COUNT, pCA->GetCreateObjCount(), TRUE);

		// _xZkqqHx_jFjEjFgJiLjHjHkDiCmMiJmBjBkMjDhIiBeC_xHqqkZx_
		SetDlgItemInt(hwndDlg, IDC_EDT_DISTANCE_POWER, pCA->GetDistancePower(), TRUE);

		// _xZkqqHx_jFjEjFgJjAeGiCmMiJmBjBkMjDhIiBeC_xHqqkZx_
		SetDlgItemInt(hwndDlg, IDC_EDT_COLOR_POWER, pCA->GetColorPower(), TRUE);

		// _xZkqqHx_jGlMjBePiCkK_xHqqkZx_Gradater_xZkqqHx_iCmMjAeGiCmMiCnNiOgHjHhAiBeC_xHqqkZx_
		CheckDlgButton(hwndDlg, IDC_CHK_ONLY_GNAME_COLOR,
						pCA->GetIsOnlyGnameColor() ? BST_CHECKED : BST_UNCHECKED);

		// _xZkqqHx_iLnPiCkCjAeGiCpAjHkMjHhAiBeC_xHqqkZx_
		CheckDlgButton(hwndDlg, IDC_CHK_USE_NEAR_COLOR,
						pCA->GetIsUseNearColor() ? BST_CHECKED : BST_UNCHECKED);

		// _xZkqqHx_iDePiDiLiBfLiDhGiJlLiBeC_xHqqkZx_
		CheckDlgButton(hwndDlg, IDC_CHK_GROUP,
						pCA->GetIsGroup() ? BST_CHECKED : BST_UNCHECKED);

		// _xZkqqHx_iDfIiDhDiDjDiDfCiDjDiDgHiDiNiBfLiDiLiCmMiPoDiMmAjCgMiBeFiJlKiMmAjCgMiCpAjAnNjCoIiBeC_xHqqkZx_
		SendMessage(GetDlgItem(hwndDlg, IDC_SPN_CREATE_OBJ_COUNT),
					UDM_SETRANGE, 0, MAKELPARAM(MAX_CREATE_OBJ_COUNT, MIN_CREATE_OBJ_COUNT));

		// _xZkqqHx_iDfIiDhDiDjDiDfCiDjDiDgHiDiNiBfLiDiLiCmMiPoDiMmAjCgMiBeFiJlKiMmAjCgMiCpAjAnNjCoIiBeC_xHqqkZx_
		SendMessage(GetDlgItem(hwndDlg, IDC_SPN_DISTANCE_POWER),
					UDM_SETRANGE, 0, MAKELPARAM(MAX_DISTANCE_POWER, MIN_DISTANCE_POWER));

		// _xZkqqHx_iDfIiDhDiDjDiDfCiDjDiDgHiDiNiBfLiDiLiCmMiPoDiMmAjCgMiBeFiJlKiMmAjCgMiCpAjAnNjCoIiBeC_xHqqkZx_
		SendMessage(GetDlgItem(hwndDlg, IDC_SPN_COLOR_POWER),
					UDM_SETRANGE, 0, MAKELPARAM(MAX_COLOR_POWER, MIN_COLOR_POWER));

		break;
	  }

	case WM_COMMAND:
		switch (wParam)
		{
		case IDOK:
		  {
			// _xZkqqHx_jAfGiLeLiNoMjAkMjFjEjFgJjAjEiBeC_xHqqkZx_
			short nCreateObjCount = GetDlgItemInt(hwndDlg, IDC_EDT_CREATE_OBJ_COUNT, NULL, TRUE);
			if (nCreateObjCount < MIN_CREATE_OBJ_COUNT ||
				MAX_CREATE_OBJ_COUNT < nCreateObjCount)
			{
				// ERR_CREATE_OBJ_COUNT_OUT_OF_RANGE = "_xZkqqHx_jAfGiLeLiNoMjAkMjFjEjFgJjAjEiCkKjAkHiMmAjCgMiCpAjClEiCkGiCmEiCkCiCnMiClH_xHqqkZx_"
				pCA->GetUtilErrI()->ErrorBox(ERR_CREATE_OBJ_COUNT_OUT_OF_RANGE, MfcSize(0,0));
				break;
			}
			// _xZkqqHx_jFjEjFgJiLjHjHkDiCmMiJmBjBkMjDhIiBeC_xHqqkZx_
			long lDistancePower = GetDlgItemInt(hwndDlg, IDC_EDT_DISTANCE_POWER, NULL, TRUE);
			if (lDistancePower < MIN_DISTANCE_POWER ||
				MAX_DISTANCE_POWER < lDistancePower)
			{
				// ERR_DISTANCE_POWER_OUT_OF_RANGE = "_xZkqqHx_jFjEjFgJiCmMiLjHjHkDiJmBjBkMjCgMiCkKjAkHiMmAjCgMiCpAjClEiCkGiCmEiCkCiCnMiClH_xHqqkZx_"
				pCA->GetUtilErrI()->ErrorBox(ERR_DISTANCE_POWER_OUT_OF_RANGE, MfcSize(0,0));
				break;
			}
			// _xZkqqHx_jFjEjFgJjAeGiCmMiJmBjBkMjDhIiBeC_xHqqkZx_
			long lColorPower = GetDlgItemInt(hwndDlg, IDC_EDT_COLOR_POWER, NULL, TRUE);
			if (lColorPower < MIN_COLOR_POWER ||
				MAX_COLOR_POWER < lColorPower)
			{
				// ERR_COLOR_POWER_OUT_OF_RANGE = "_xZkqqHx_jFjEjFgJiCmMjAeGiJmBjBkMjCgMiCkKjAkHiMmAjCgMiCpAjClEiCkGiCmEiCkCiCnMiClH_xHqqkZx_"
				pCA->GetUtilErrI()->ErrorBox(ERR_COLOR_POWER_OUT_OF_RANGE, MfcSize(0,0));
				break;
			}

			pCA->SetCreateObjCount(nCreateObjCount);
			pCA->SetDistancePower(lDistancePower);
			pCA->SetColorPower(lColorPower);

			// _xZkqqHx_jGlMjBePiCkK_xHqqkZx_Gradater_xZkqqHx_iCmMjAeGiCmMiCnNiOgHjHhAiBeC_xHqqkZx_
			short nIsOnlyGnameColor =
				(IsDlgButtonChecked(hwndDlg, IDC_CHK_ONLY_GNAME_COLOR) == BST_CHECKED);
			pCA->SetIsOnlyGnameColor(nIsOnlyGnameColor);

			// _xZkqqHx_iLnPiCkCjAeGiCpAjHkMjHhAiBeC_xHqqkZx_
			short nIsUseNearColor =
				(IsDlgButtonChecked(hwndDlg, IDC_CHK_USE_NEAR_COLOR) == BST_CHECKED);
			pCA->SetIsUseNearColor(nIsUseNearColor);

			// _xZkqqHx_jFjEjFgJiCpAiDePiDiLiBfLiDhGiJlLiBeC_xHqqkZx_
			short nIsGroup =
				(IsDlgButtonChecked(hwndDlg, IDC_CHK_GROUP) == BST_CHECKED);
			pCA->SetIsGroup(nIsGroup);

			// _xZkqqHx_iDfCiDhNiDjDiDgIiOmAiNhDiBeC_xHqqkZx_
			pCA->GetMolipMainI()->PostMessage(WM_COMMAND, pCA->GetCommandId(0), 0);

//			EndDialog(hwndDlg, TRUE);
			break;
		  }
		case IDCANCEL:
			EndDialog(hwndDlg, FALSE);
			break;
		case IDHELP:
		  {
			// _xZkqqHx_iDiCiDfHiDiFiBfLiDiLiCmMiDgGiDeCiDiMiDeOiDgHiDiKjFhEiCkLjGlMjBePiBgJiKgHjCkDiOhBjGlDiClFiBgKiCpAiOoGjDlOiBeC_xHqqkZx_
			_TCHAR tcsModule[_MAX_PATH * 2];
			FMpgGetModule()->GetModulePathName(tcsModule, _MAX_PATH);
			_tcscat(tcsModule, _T(".hlp"));
			::WinHelp(pCA->GetMolipMainI()->GetMainWindow(), tcsModule,
					HELP_CONTEXT, DWORD(HID_BASE_RESOURCE + IDD_DLG_CONTROL));
			break;
		  }
		}
		break;

	case WM_CLOSE:
		PostMessage(hwndDlg, WM_COMMAND, IDCANCEL, 0L);
		break;

	default:
		return FALSE;
	}
	return TRUE;
} // myDialogProc.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::OnCommand
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiCiDfHiDiFiBfLiDiLiCkKjAnNjCoIiClFiClNiDfCiDhNiDjDiDgIiCkKiOmAiNhDiClDiCoKiClNiCmGiCkLiCmJiMmEiCmOiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	nCmdID	:_xZkqqHx_iOmAiNhDiClDiCoKiClNiDfCiDhNiDjDiDgIiCmM_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAkMiMpHiClFiClNiPoKiNiHiCmN_xHqqkZx_ S_OK_xZkqqHx_iBeBiOlIjEhDiClFiClNiPoKiNiHiCmNiDeHiDiJiBfLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
HRESULT CA::OnCommand (UINT nCmdID)
{
	if (nCmdID == m_adwCommandId[0])
	//----- _xZkqqHx_iDePiDiJiDgGiBfLiDfGiDiHiDjDiOmAiNhDiDfCiDhNiDjDiDgI_xHqqkZx_ -----
	{
		GradationObject(FALSE);
	} else
	if (nCmdID == m_adwCommandId[1])
	//----- _xZkqqHx_iDePiDiJiDgGiBfLiDfGiDiHiDjDjAkHiMoEiDhAiDgMiDiLiDfCiDhNiDjDiDgI_xHqqkZx_ -----
	{
		if (m_hwndDialog == NULL)
		//----- _xZkqqHx_iDfPiDeDiDeBiDiNiDePiCkKjGkCiNoMjAkMiCmMiPoKiNiH_xHqqkZx_ -----
		{
			m_hwndDialog = CreateDialogParam((HINSTANCE)FMpgGetModule()->GetModuleHandle(),
											MAKEINTRESOURCE(IDD_DLG_CONTROL),
											GetMolipMainI()->GetMainWindow(),
											DLGPROC(myDialogProc),
											LPARAM(this));
		}
		if (!IsWindowVisible(m_hwndDialog))
			ShowWindow(m_hwndDialog, SW_SHOW);
		return S_OK;
	} else
	if (nCmdID == m_adwCommandId[2])
	//----- _xZkqqHx_iDhHiDiLiDhGiDfCiDhNiDjDiDgI_xHqqkZx_ -----
	{
		// _xZkqqHx_iDiCiDfHiDiFiBfLiDiLiCmMiDgGiDeCiDiMiDeOiDgHiDiKjFhEiCkLjGlMjBePiBgJiKgHjCkDiOhBjGlDiClFiBgKiCpAiOoGjDlOiBeC_xHqqkZx_
		_TCHAR tcsModule[_MAX_PATH];
		FMpgGetModule()->GetModulePathName(tcsModule, _MAX_PATH);
		_tcscat(tcsModule, _T(".hlp"));
		::WinHelp(GetMolipMainI()->GetMainWindow(), tcsModule, HELP_FINDER,(DWORD)0);
	} else
	if (nCmdID == m_adwCommandId[3])
	//----- _xZkqqHx_iDgPiBfLiDfHiDiHiDjDiPoOjFpB_xHqqkZx_ -----
	{
		GetMolipMainI()->ShowAboutDialog();
	}
	return S_OK;
} // CA::OnCommand.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::OnUpdateCommandUI
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiCiDfHiDiFiBfLiDiLiCkKjAnNjCoIiClFiClNiDfCiDhNiDjDiDgIiCmMiDiBiDgKiDiFiBfLiCkKjFfMiOkGiClDiCoKiClNiCmGiCkLiCmJiMmEiCmOiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pCmdUI	:_xZkqqHx_iDfCiDhNiDjDiDgIjFfMiOkGiPpDjBnEiCmMiDeJiDhFiDfHiDeGiDeOiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAkMiMpHiClFiClNiPoKiNiHiCmN_xHqqkZx_ S_OK_xZkqqHx_iBeBiOlIjEhDiClFiClNiPoKiNiHiCmNiDeHiDiJiBfLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
HRESULT CA::OnUpdateCommandUI (MfcCmdUI* pCmdUI)
{
	// _xZkqqHx_iDfEiDhFiDiBiDgKiDiFiBfLiCmMiPoKiNiHiBgJiDfEiDhFiDiBiDgKiDiFiBfLiCmFiCoAiClBiClBiCkKiMmEiCmOiCoKiCoJiBgKiCmNiBeBjFjMiLeBiBeC_xHqqkZx_
	if (pCmdUI->m_pSubMenu != NULL) return S_OK;
	if (pCmdUI->m_nID == m_adwCommandId[0])
	//----- _xZkqqHx_iDePiDiJiDgGiBfLiDfGiDiHiDjDiOmAiNhDiDfCiDhNiDjDiDgI_xHqqkZx_ -----
	{
		pCmdUI->Enable(GradationObject(TRUE));
	}
	return S_OK;
} // CA::OnUpdateCommandUI.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetPopHint
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhGiDiJiDePiDeDiDjDiDfCiDhNiDjDiDgIiCmMiDhMiDgCiDhGiDhBiDjDiDgHiCmMiDgFiDeMiDfIiDgHiCpAiOoGjDlOiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iDiBiDgKiDiFiBfLiPoDiCmJiDhNiDeFiDfIiDeKiBfLiDfMiDiLiCkKiInKjDkOiClFiClNiCmGiCkLiCmJjFfMiOkGiClDiCoKiCoJiDiBiDgCiDfKiBfLiDfH_xHqqkZx_
 *			_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	wstrHintText:_xZkqqHx_iDhBiDjDiDgHiDgFiDeMiDfIiDgHiCpAjFnEiClHiBeC_xHqqkZx_
 *			nCmdID		:_xZkqqHx_iDfCiDhNiDjDiDgI_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAkMiMpHiClFiClNiPoKiNiHiCmN_xHqqkZx_ S_OK_xZkqqHx_iBeBiOlIjEhDiClFiClNiPoKiNiHiCmNiDeHiDiJiBfLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.03.17 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
HRESULT CA::GetPopHint (WString& wstrHintText, UINT nCmdID)
{
	for (int iC = 0; iC != sizeof(PG_MENU) / sizeof(PG_MENU[0]); iC++)
	{
		if (nCmdID == m_adwCommandId[iC])
		//----- iC_xZkqqHx_jEnEjGnKiCmMiDfCiDhNiDjDiDgIiCmMiPoKiNiH_xHqqkZx_ -----
		{
			// _xZkqqHx_iDhBiDgCiDgHiDgFiDeMiDfIiDgHiCpAjAnNjCoIiBeC_xHqqkZx_
			wstrHintText = PG_HINT_TEXT[iC];
			break;
		}
	}
	return S_OK;
} // CA::GetPopHint.

/////////////////////////////////////////////////////////////////////////////////

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::CA
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeCiDeKiDeFiDjDiDfOiCpAiJmBiOfKiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
CA::CA ()
	:	m_hwndDialog(NULL)			// _xZkqqHx_iDfPiDeDiDeBiDiNiDePiDgOiDjDiDgIiDiLiBeC_xHqqkZx_
{
} // CA::CA.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::~CA
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgGiDfIiDgHiDiJiDeOiDfOiBeCiDeKiDeFiDjDiDfOiCpAiMlIiOfKiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
CA::~CA ()
{
} // CA::~CA.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetCommandId
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiClDiCoKiClNiDeDiDjDiDgGiDgCiDeOiDfIiCmMiDfCiDhNiDjDiDgIiCgIiCgDiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	iIndex	:_xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *				0	_xZkqqHx_iDePiDiJiDgGiBfLiDfGiDiHiDjDiOmAiNhD_xHqqkZx_
 *				1	_xZkqqHx_jAkHiMoEiDhAiDgMiDiLjFfMiOkG_xHqqkZx_
 *				2	_xZkqqHx_iDhHiDiLiDhGjFfMiOkG_xHqqkZx_
 *				3	_xZkqqHx_iDePiDiJiDgGiBfLiDfOiBfLiCmMiDgPiBfLiDfHiDiHiDjDiPoOjFpBjFfMiOkG_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDfCiDhNiDjDiDgIiCgIiCgDiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.03.20 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
DWORD CA::GetCommandId (int iIndex) const
{
	return m_adwCommandId[iIndex];
} // CA::GetCommandId.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetCreateObjCount
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFjAfGiLeLjFjEjFgJiNoMjAkMjAjEiBhGiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAfGiLeLjFjEjFgJiNoMjAkMjAjEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
short CA::GetCreateObjCount ()
{
	if (m_nCreateObjCount == -1)
	{
		HRESULT hr = GetMolipMainI()->GetProfileBinary(L"CreateObjCount",
														(BYTE*)&m_nCreateObjCount,
														sizeof(m_nCreateObjCount));
		if (hr != S_OK) m_nCreateObjCount = DEFAULT_CREATE_OBJ_COUNT;
	}
	return m_nCreateObjCount;
} // CA::GetCreateObjCount.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetDistancePower
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFjFjEjFgJiLjHjHkDiCmMiJmBjBkMjDhIiBhGiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiLjHjHkDiCmMiJmBjBkMjDhIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
long CA::GetDistancePower ()
{
	if (m_lDistancePower == -1)
	{
		HRESULT hr = GetMolipMainI()->GetProfileBinary(L"DistancePower",
														(BYTE*)&m_lDistancePower,
														sizeof(m_lDistancePower));
		if (hr != S_OK) m_lDistancePower = DEFAULT_DISTANCE_POWER;
	}
	return m_lDistancePower;
} // CA::GetDistancePower.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetColorPower
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFjFjEjFgJjAeGiCmMiJmBjBkMjDhIiBhGiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFjEjFgJjAeGiCmMiJmBjBkMjDhIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
long CA::GetColorPower ()
{
	if (m_lColorPower == -1)
	{
		HRESULT hr = GetMolipMainI()->GetProfileBinary(L"ColorPower",
														(BYTE*)&m_lColorPower,
														sizeof(m_lColorPower));
		if (hr != S_OK) m_lColorPower = DEFAULT_COLOR_POWER;
	}
	return m_lColorPower;
} // CA::GetColorPower.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetIsOnlyGnameColor
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFjAeGjGlMiBhF_xHqqkZx_Gradater_xZkqqHx_iBhGiCmMiCnNiOgHjHhAiBhGiClHiCoJiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iBhFjAeGjGlMiBhF_xHqqkZx_Gradater_xZkqqHx_iBhGiCmMiCnNiOgHjHhAiBhGiClHiCoJiPoKiNiHiCmN_xHqqkZx_ 1_xZkqqHx_iBeBiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_ 0_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
short CA::GetIsOnlyGnameColor ()
{
	if (m_nIsOnlyGnameColor == -1)
	{
		HRESULT hr = GetMolipMainI()->GetProfileBinary(L"IsOnlyGnameColor",
														(BYTE*)&m_nIsOnlyGnameColor,
														sizeof(m_nIsOnlyGnameColor));
		if (hr != S_OK) m_nIsOnlyGnameColor = DEFAULT_IS_ONLY_GNAME_COLOR;
	}
	return m_nIsOnlyGnameColor;
} // CA::GetIsOnlyGnameColor.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetIsUseNearColor
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFiLnPiCkCjAeGiCpAjHkMjHhAiBhGiClHiCoJiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iBhFiLnPiCkCjAeGiCpAjHkMjHhAiBhGiClHiCoJiPoKiNiHiCmN_xHqqkZx_ 1_xZkqqHx_iBeBiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_ 0_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
short CA::GetIsUseNearColor ()
{
	if (m_nIsUseNearColor == -1)
	{
		HRESULT hr = GetMolipMainI()->GetProfileBinary(L"IsUseNearColor",
														(BYTE*)&m_nIsUseNearColor,
														sizeof(m_nIsUseNearColor));
		if (hr != S_OK) m_nIsUseNearColor = DEFAULT_IS_USE_NEAR_COLOR;
	}
	return m_nIsUseNearColor;
} // CA::GetIsUseNearColor.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GetIsGroup
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFjFjEjFgJiCpAiDePiDiLiBfLiDhGiJlLiBhGiClHiCoJiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iBhFjFjEjFgJiCpAiDePiDiLiBfLiDhGiJlLiBhGiClHiCoJiPoKiNiHiCmN_xHqqkZx_ 1_xZkqqHx_iBeBiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_ 0_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.03.20 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
short CA::GetIsGroup ()
{
	if (m_nIsGroup == -1)
	{
		HRESULT hr = GetMolipMainI()->GetProfileBinary(L"IsGroup",
														(BYTE*)&m_nIsGroup,
														sizeof(m_nIsGroup));
		if (hr != S_OK) m_nIsGroup = DEFAULT_IS_GROUP;
	}
	return m_nIsGroup;
} // CA::GetIsGroup.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::SetCreateObjCount
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFjAfGiLeLjFjEjFgJiNoMjAkMjAjEiBhGiCpAjAnNjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	nCreateObjCount	:_xZkqqHx_iBhFjAfGiLeLjFjEjFgJiNoMjAkMjAjEiBhGiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_jCgMiCpAiDiMiDfHiDfIiDgHiDiKiCmJiPjBiCkLiNjOiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CA::SetCreateObjCount (short nCreateObjCount)
{
	if (m_nCreateObjCount != nCreateObjCount)
	{
		m_nCreateObjCount = nCreateObjCount;
		GetMolipMainI()->SetProfileBinary(L"CreateObjCount",
											(BYTE*)&m_nCreateObjCount,
											sizeof(m_nCreateObjCount));
	}
} // CA::SetCreateObjCount.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::SetDistancePower
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFjFjEjFgJiLjHjHkDiCmMiJmBjBkMjDhIiBhGiCpAjAnNjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	lDistancePower	:_xZkqqHx_iBhFjFjEjFgJiLjHjHkDiCmMiJmBjBkMjDhIiBhGiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_jCgMiCpAiDiMiDfHiDfIiDgHiDiKiCmJiPjBiCkLiNjOiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CA::SetDistancePower (long lDistancePower)
{
	if (m_lDistancePower != lDistancePower)
	{
		m_lDistancePower = lDistancePower;
		GetMolipMainI()->SetProfileBinary(L"DistancePower",
											(BYTE*)&m_lDistancePower,
											sizeof(m_lDistancePower));
	}
} // CA::SetDistancePower.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::SetColorPower
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFjFjEjFgJjAeGiCmMiJmBjBkMjDhIiBhGiCpAjAnNjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	lColorPower	:_xZkqqHx_iBhFjFjEjFgJjAeGiCmMiJmBjBkMjDhIiBhGiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_jCgMiCpAiDiMiDfHiDfIiDgHiDiKiCmJiPjBiCkLiNjOiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CA::SetColorPower (long lColorPower)
{
	if (m_lColorPower != lColorPower)
	{
		m_lColorPower = lColorPower;
		GetMolipMainI()->SetProfileBinary(L"ColorPower",
											(BYTE*)&m_lColorPower,
											sizeof(m_lColorPower));
	}
} // CA::SetColorPower.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::SetIsOnlyGnameColor
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFjAeGjGlMiBhF_xHqqkZx_Gradater_xZkqqHx_iBhGiCmMiCnNiOgHjHhAiBhGiCmMiPpDjBnEiCpAjAnNjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	nIsOnlyGnameColor	:_xZkqqHx_iBhFjAeGjGlMiBhF_xHqqkZx_Gradater_xZkqqHx_iBhGiCmMiCnNiOgHjHhAiBhGiClHiCoJiPoKiNiHiCmN_xHqqkZx_ 1_xZkqqHx_iBeB_xHqqkZx_
								 _xZkqqHx_iClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_ 0 _xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_jCgMiCpAiDiMiDfHiDfIiDgHiDiKiCmJiPjBiCkLiNjOiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CA::SetIsOnlyGnameColor (short nIsOnlyGnameColor)
{
	if (m_nIsOnlyGnameColor != nIsOnlyGnameColor)
	{
		m_nIsOnlyGnameColor = nIsOnlyGnameColor;
		GetMolipMainI()->SetProfileBinary(L"IsOnlyGnameColor",
											(BYTE*)&m_nIsOnlyGnameColor,
											sizeof(m_nIsOnlyGnameColor));
	}
} // CA::SetIsOnlyGnameColor.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::SetIsUseNearColor
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFiLnPiCkCjAeGiCpAjHkMjHhAiBhGiCmMiPpDjBnEiCpAjAnNjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	nIsUseNearColor	:_xZkqqHx_iBhFiLnPiCkCjAeGiCpAjHkMjHhAiBhGiClHiCoJiPoKiNiHiCmN_xHqqkZx_ 1_xZkqqHx_iBeBiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_
 *							 0 _xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_jCgMiCpAiDiMiDfHiDfIiDgHiDiKiCmJiPjBiCkLiNjOiCnOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CA::SetIsUseNearColor (short nIsUseNearColor)
{
	if (m_nIsUseNearColor != nIsUseNearColor)
	{
		m_nIsUseNearColor = nIsUseNearColor;
		GetMolipMainI()->SetProfileBinary(L"IsUseNearColor",
											(BYTE*)&m_nIsUseNearColor,
											sizeof(m_nIsUseNearColor));
	}
} // CA::SetIsUseNearColor.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::SetIsGroup
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iBhFjFjEjFgJiCpAiDePiDiLiBfLiDhGiJlLiBhGiClHiCoJiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	nIsGroup	:_xZkqqHx_iBhFjFjEjFgJiCpAiDePiDiLiBfLiDhGiJlLiBhGiClHiCoJiPoKiNiHiCmN_xHqqkZx_ 1_xZkqqHx_iBeBiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_
 *							 0 _xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.03.20 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CA::SetIsGroup (short nIsGroup)
{
	if (m_nIsGroup != nIsGroup)
	{
		m_nIsGroup = nIsGroup;
		GetMolipMainI()->SetProfileBinary(L"IsGroup",
											(BYTE*)&m_nIsGroup,
											sizeof(m_nIsGroup));
	}
} // CA::SetIsGroup.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::FindSColor
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOhHjCoIiCmMjAeGiCmJiLnPiCkCiBgJiIoKjChGiClHiCoJiBgKjAeGiCmM_xHqqkZx_S_xZkqqHx_jAeGiBgJjAeG_xHqqkZx_ID_xZkqqHx_iBgKiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	color	:_xZkqqHx_iMjPiNpFjBmOiPnLiCmMjAeGiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	S_xZkqqHx_jAeGiBgJjAeG_xHqqkZx_ID_xZkqqHx_iBgKiBeCiMkJiCmCiCkJiCoHiCmIiCkCiPoKiNiHiCmN_xHqqkZx_ FD_S_COLOR_UNSPECIFY_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_jAnNjCoIiCmJiCoGiCoIiBeBiCnMiCmBiClNiCkNjDkPiClGjAeGiCpAjCfEiClHiCkJiBeBiLnPiCkCjAeGiCmFjBoDjHhAiClFiClNiCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
SColorID CA::FindSColor (COLORREF color)
{
	long lColDistance = 20;		// _xZkqqHx_jAeGiLjHjHkDiCmMiNmFjCoBjCgMiBeCjBoDjHhAjAeGiMjPiNpFiCmMiPoKiNiHiBeB_xHqqkZx_
								// _xZkqqHx_iClBiCoKiCoGiCoIiLjHjHkDiCkKjBoFiCkLiCkCiPoKiNiHiCmNiOgHiCkGiCmIiCkCiBeC_xHqqkZx_
	SColorID scidNear = FD_S_COLOR_UNSPECIFY;
	const long lRed   = GetRValue(color);
	const long lGreen = GetGValue(color);
	const long lBlue  = GetBValue(color);

	FCEnv* pEnv = GetMolipMainI()->GetEnv();
	FDSColorIDVector::const_iterator iId;
	for	(iId = pEnv->GetFreqSColorVector().begin();
		 iId != pEnv->GetFreqSColorVector().end(); iId++)
	{
		FCSColorRec colRecTmp = *pEnv->GetSColorRec(*iId);
		// _xZkqqHx_jAeGjGlMiBhF_xHqqkZx_Gradater_xZkqqHx_iBhGiCmMiCnNiOgHjHhAiBeC_xHqqkZx_
		if (GetIsOnlyGnameColor() &&
			wcsncmp(colRecTmp.m_szName, PG_COLOR_NAME, PG_COLOR_NAME_LEN) != 0) continue;
		// _xZkqqHx_jDkPiClGjAeGiCkKiCkAiCmBiClNiPoKiNiHiCmNjFjMiLeBiBeC_xHqqkZx_
		if (colRecTmp.m_crRef == color) return *iId;
		// _xZkqqHx_iLnPiCkCjAeGiCpAjHkMjHhAiBeC_xHqqkZx_
		if (GetIsUseNearColor())
		{
			long lRedTmp   = GetRValue(colRecTmp.m_crRef);
			long lGreenTmp = GetGValue(colRecTmp.m_crRef);
			long lBlueTmp  = GetBValue(colRecTmp.m_crRef);
			long lDist = (lRed - lRedTmp) * (lRed - lRedTmp) +
						(lGreen - lGreenTmp) * (lGreen - lGreenTmp) +
						(lBlue - lBlueTmp) * (lBlue - lBlueTmp);
			if (lDist < lColDistance)
			{
				scidNear = *iId;
				lColDistance = lDist;
			}
		}
	}
	return scidNear;
} // CA::FindSColor.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GradationObject
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	bIsTest	:_xZkqqHx_jFoCiKnEjFjEjFgJiNoMjAkMiJmCjEfMiCmMiDgFiDfIiDgHiCmMiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCkKiNoMjAkMiCmFiCkLiClNiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iBeCiDgFiDfIiDgHiCmMiPoKiNiHiCmNiBeB_xHqqkZx_
 *			_xZkqqHx_iNoMjAkMiJmCjEfMiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CA::GradationObject (BOOL bIsTest)
{
	CFCDynamicDrawView* pView = GetMolipMainI()->GetView();
	CFCFoundDoc* pDoc = GetMolipMainI()->GetDocument();
	const ObjDynabaseVector& vObj = pView->SelectObjVector();
	if (vObj.size() != 2) return FALSE;
	FCObjDynabase* pObj0 = vObj[0];
	FCObjDynabase* pObj1 = vObj[1];
	if (pObj0->Type() != pObj1->Type()) return FALSE;
	// _xZkqqHx_jAeGjGlMiCmMjEnEiNiGiCpAiPiJiKpKiJlLiBeC_xHqqkZx_
	m_lColorNameCount = 0;
	FCLayerZOrder lzOrder0 = pDoc->ObjDynabaseToLZOrder(pObj0);
	FCLayerZOrder lzOrder1 = pDoc->ObjDynabaseToLZOrder(pObj1);
	if (lzOrder1 < lzOrder0)
	{
		FCObjDynabase* pObjTmp = pObj0;
		pObj0 = pObj1;
		pObj1 = pObjTmp;
		FCLayerZOrder lzOrderTmp = lzOrder0;
		lzOrder0 = lzOrder1;
		lzOrder1 = lzOrderTmp;
	}

	if (!bIsTest)
	//----- _xZkqqHx_iDgFiDfIiDgHiCmFiCmNiCmIiCkCiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_iLeMjIfOiDfKiDgCiDfGiDiHiDjDiKeKiOgOiBeC_xHqqkZx_
		pDoc->SessionBegin();
	}
	// _xZkqqHx_iDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCkKjAkMiMpHiClFiClNiCkJiBeI_xHqqkZx_
	BOOL bSucceed = FALSE;
	for (long lC = 1; lC < 1 + GetCreateObjCount(); lC++)
	{
		// _xZkqqHx_jFjEjFgJiImKjChFiCmMjEoEjHkGiCmGjAeGiCmMjEoEjHkGiCpAiOfKiPgPiBeC_xHqqkZx_
		double dA1 = double(lC) / (1 + GetCreateObjCount());
		dA1 = pow(dA1, double(GetDistancePower()) / 100.0);
		double dC1 = double(lC) / (1 + GetCreateObjCount());
		dC1 = pow(dC1, double(GetColorPower()) / 100.0);

		// _xZkqqHx_jAfGiClFiCkNiNoMjAkMiClDiCoKiCoJjFjEjFgJiBeC_xHqqkZx_
		FCObjDynabase* pNew = bIsTest ? NULL : pObj0->Duplicate();
		switch (pObj0->Type())
		{
		case FDOJ_LINE:
			bSucceed = GradationLine((FCObjLine*)pNew, (FCObjLine*)pObj0, (FCObjLine*)pObj1, dA1, dC1, bIsTest);
			break;
		case FDOJ_RECT:
			bSucceed = GradationRect((FCObjRect*)pNew, (FCObjRect*)pObj0, (FCObjRect*)pObj1, dA1, dC1, bIsTest);
			break;
		case FDOJ_ROUND_RECT:
			bSucceed = GradationRoundRect((FCObjRoundRect*)pNew, (FCObjRoundRect*)pObj0, (FCObjRoundRect*)pObj1, dA1, dC1, bIsTest);
			break;
		case FDOJ_ARC:
			bSucceed = GradationArc((FCObjArc*)pNew, (FCObjArc*)pObj0, (FCObjArc*)pObj1, dA1, dC1, bIsTest);
			break;
		case FDOJ_POLY:
			bSucceed = GradationPoly((FCObjPoly*)pNew, (FCObjPoly*)pObj0, (FCObjPoly*)pObj1, dA1, dC1, bIsTest);
			break;
		case FDOJ_WIDE_POLY:
			bSucceed = GradationWidePoly((FCObjWidePoly*)pNew, (FCObjWidePoly*)pObj0, (FCObjWidePoly*)pObj1, dA1, dC1, bIsTest);
			break;
		case FDOJ_GROUP:
			bSucceed = GradationGroup((FCObjGroup*)pNew, (FCObjGroup*)pObj0, (FCObjGroup*)pObj1, dA1, dC1, bIsTest);
			break;
		default:
			bSucceed = FALSE;
		}
		if (!bSucceed)
		{
			if (pNew != NULL) delete pNew;
			break;
		}

		if (!bIsTest)
		//----- _xZkqqHx_iDgFiDfIiDgHiCmFiCmNiCmIiCkCiPoKiNiH_xHqqkZx_ -----
		{
			pNew->CalcResizeFrame();
			// _xZkqqHx_jFjEjFgJ_xHqqkZx_ID_xZkqqHx_iCpAiOoGjDlOiClFiBeBjFjEjFgJiCmJjAnNjCoIiClHiCoJiBeC_xHqqkZx_
			pNew->RegisterObjID();
			// _xZkqqHx_jFjEjFgJjAlGjAkMiCmMiLeMjIfOiBeC_xHqqkZx_
			pDoc->MulticmdCreate1Obj(pNew, pDoc->GetCurrentSheetId(), lzOrder1);
			pView->AppendSelectObj(pNew, FALSE);
			pView->AppendToLastRgn(pNew);
		}
	}
	if (!bIsTest)
	//----- _xZkqqHx_iDgFiDfIiDgHiCmFiCmNiCmIiCkCiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_iLeMjIfOiDfKiDgCiDfGiDiHiDjDiCmMiPeJjHlJiBeC_xHqqkZx_
		pDoc->SessionEnd();
		pView->AppendToLastRgn(pObj0);
		pView->AppendToLastRgn(pObj1);
		pView->SendRgnRedraw();
		// _xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJiCpAiDePiDiLiBfLiDhGiJlLiBeC_xHqqkZx_

		if ((GetMolipMainI()->GetAppMode() & FD_APPMODE_ARROWEDITOR) != FD_APPMODE_ARROWEDITOR)
		//----- _xZkqqHx_jGoOiIpDiDeHiDgGiDeCiDfOiImIiKePiCmMiPoKiNiH_xHqqkZx_ -----
		{
			if (GetIsGroup())
			//----- _xZkqqHx_iDePiDiLiBfLiDhGiJlLiCkKiOhHjCoIiClDiCoKiCmEiCkCiCoJiPoKiNiH_xHqqkZx_ ----
			{
				// _xZkqqHx_iNoMjAkMiClFiClNjFjEjFgJiMfBiCpAiCnMiCmGiCnPiCoJiClNiCnPiCmJiDePiDiLiBfLiDhGiJlLiBeC_xHqqkZx_
				// _xZkqqHx_jGoOiIpDiDeHiDgGiDeCiDfOiCmMiPoKiNiHiCmNiBeBiDePiDiLiBfLiDhGjFjEjFgJiCkKiIlFiCkGiCmIiCkCiCmMiCmFiDePiDiLiBfLiDhGiJlLiClFiCmIiCkCiBeC_xHqqkZx_
				GetMolipMainI()->PostMessage(WM_COMMAND, FD_ID_OBJECT_GROUP, 0);
			}
		}
	}
	return bSucceed;
} // CA::GradationObject.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GradationRichText
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMiDgFiDeMiDfIiDgHiCmMjAeGiCmMiDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pNew	:_xZkqqHx_iDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiClDiCoKiCoJjBmOiPnLiCmMjFjEjFgJiCpAiOhHjCoIiBeC_xHqqkZx_
 *					 pObj0_xZkqqHx_iCmMjFkBjAlLiCkKiOhHjCoIiClDiCoKiCoJiBeC_xHqqkZx_
 *			pObj0	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_0_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			pObj1	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			dC1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBjAeGiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iClBiCmMiKnGjAjEiCmNiDgFiDfIiDgHiCmNiClFiCmIiCkCiBeCjFeLiClIiPiIjHjNiClFiCmEjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.03.22 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CA::GradationRichText (FCObjFigure* pNew,
							const FCObjFigure* pObj0,
							const FCObjFigure* pObj1,
							double dC1)
{
	// _xZkqqHx_iCmHiClPiCoHiCkJiCmMiDgFiDeMiDfIiDgHiCkKjGlDiCkCiPoKiNiHiCmN_xHqqkZx_FALSE_xZkqqHx_iBeC_xHqqkZx_
	if (pObj0->GetRichText() == NULL || pObj1->GetRichText() == NULL)
		return;

	CFCDynamicDrawView* pView = GetMolipMainI()->GetView();
	// _xZkqqHx_iDgFiDeMiDfIiDgHiDeHiDgGiDeCiDfOiCpAiOoGjDlOiBeC_xHqqkZx_
	CFCWndRichEdit* pEdit = pView->GetRTFEditor();
	long lIndexSize;
	long lIndex;

	// _xZkqqHx_iDgFiDeMiDfIiDgHiDeHiDgGiDeCiDfOiCmJiDgFiDeMiDfIiDgHiCpAiDeHiDeOiDfIiDhMiBfLiDgHiBeC_xHqqkZx_
	if (!pObj0->ExportToTextEditor())
		return;
	vc6_vector<COLORREF> vColor0;
	lIndexSize = pEdit->GetIndexSize();
	for (lIndex = 0; lIndex != lIndexSize; lIndex++)
	{
		const FCEditChar& editChar = pEdit->GetChar(lIndex);
		if (editChar.m_wChar == FDRCH_CONTINUE)
			GetUtilErrI()->ThrowMiscException(L"PgGradater::FDRCH_CONTINUE");
		vColor0.push_back(editChar.m_crColor);		// _xZkqqHx_jFlGiOjKiCmMjAeGiCpAiOoGjDlOiBeC_xHqqkZx_
	}
	pView->GetRTFEditor()->ClearAll();

	// _xZkqqHx_iDgFiDeMiDfIiDgHiDeHiDgGiDeCiDfOiCmJiDgFiDeMiDfIiDgHiCpAiDeHiDeOiDfIiDhMiBfLiDgHiBeC_xHqqkZx_
	if (!pObj1->ExportToTextEditor())
		return;
	vc6_vector<COLORREF> vColor1;
	lIndexSize = pEdit->GetIndexSize();
	for (lIndex = 0; lIndex != lIndexSize; lIndex++)
	{
		const FCEditChar& editChar = pEdit->GetChar(lIndex);
		if (editChar.m_wChar == FDRCH_CONTINUE)
			GetUtilErrI()->ThrowMiscException(L"PgGradater::FDRCH_CONTINUE");
		vColor1.push_back(editChar.m_crColor);		// _xZkqqHx_jFlGiOjKiCmMjAeGiCpAiOoGjDlOiBeC_xHqqkZx_
	}
	pView->GetRTFEditor()->ClearAll();

	// _xZkqqHx_jFlGiOjKjHpBiCkKjCfKiCkCjFpLiCmJiNiHiCoNiClJiCoJiBeCjGhLjHiIiCmNjDkPiClGiCmFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
	if (vColor0.size() < vColor1.size())
		vColor1.resize(vColor0.size());
	else
		vColor0.resize(vColor1.size());


	// _xZkqqHx_iDgFiDeMiDfIiDgHiDeHiDgGiDeCiDfOiCmJiDgFiDeMiDfIiDgHiCpAiDeHiDeOiDfIiDhMiBfLiDgHiBeC_xHqqkZx_
	if (!pNew->ExportToTextEditor())
		return;

	double dC2 = 1.0 -  dC1;
	vc6_vector<FCEditChar> vChar;
	for (lIndex = 0; lIndex != vColor0.size(); lIndex++)
	{
		FCEditChar editChar = pEdit->GetChar(lIndex);
		long lRed   = D2L(GetRValue(vColor0[lIndex]) * dC1 + GetRValue(vColor1[lIndex]) * dC2);
		long lGreen = D2L(GetGValue(vColor0[lIndex]) * dC1 + GetGValue(vColor1[lIndex]) * dC2);
		long lBlue  = D2L(GetBValue(vColor0[lIndex]) * dC1 + GetBValue(vColor1[lIndex]) * dC2);
		editChar.m_crColor = RGB(lRed, lGreen, lBlue);
		vChar.push_back(editChar);
	}
	
	// _xZkqqHx_iDfCiDhNiDjDiDgIiDfKiDgCiDfGiDiHiDjDiKeKiOgOiBeC_xHqqkZx_
	pView->GetRTFEditor()->SessionBegin();
	// _xZkqqHx_iDhEiDeIiDjDiDgHjFmPiNfIiDfCiDhNiDjDiDgIiCpAjEkNiNhDiBeC_xHqqkZx_
	pView->GetRTFEditor()->CmdFormatChars(0, vChar.size(), &vChar[0]);
	// _xZkqqHx_iDfCiDhNiDjDiDgIiDfKiDgCiDfGiDiHiDjDiPeJjHlJiBeC_xHqqkZx_
	pView->GetRTFEditor()->SessionEnd();
	// _xZkqqHx_iNhDiCmMiNmEiMhGiOfKiBeC_xHqqkZx_
	pView->GetRTFEditor()->CalcLineAll();

	// _xZkqqHx_iDgFiDeMiDfIiDgHiCpAiOpDiCkPiOoGiCoJiBeC_xHqqkZx_
	if (!pNew->ImportFromTextEditor())
		return;

	pView->GetRTFEditor()->ClearAll();
} // CA::GradationRichText.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GradationFigure
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jAhNiMgAjFjEjFgJiBgJjCiKiPnLjFjEjFgJiDeOiDiJiDfIiBgKiCmMiDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pObj0	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_0_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			pObj1	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			dA1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBiImKjChFiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dC1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBjAeGiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsTest	:_xZkqqHx_jFoCiKnEjFjEjFgJiNoMjAkMiJmCjEfMiCmMiDgFiDfIiDgHiCmMiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCpAjFnEiClHiBeCiDgFiDfIiDgHiCmMiPoKiNiHiCmNiBeBiNoMjAkMiJmCjEfMiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CA::GradationFigure (	FCObjFigure* pNew,
							const FCObjFigure* pObj0,
							const FCObjFigure* pObj1,
							double dA1, double dC1,
							BOOL bIsTest)
{
	//----- _xZkqqHx_iDgFiDfIiDgHiCmMiPoKiNiH_xHqqkZx_ -----
	if (bIsTest) return TRUE;

	double dA2 = 1.0 -  dA1;
	double dC2 = 1.0 -  dC1;
	CFCFoundDoc* pDoc = GetMolipMainI()->GetDocument();
	FCEnv* pEnv = GetMolipMainI()->GetEnv();

	// _xZkqqHx_iLeMjIfOiDfKiDgCiDfGiDiHiDjDiKeKiOgOiBeCjAfGiClFiCkCjAeGiCpAjDgPjIfOiClHiCoJiClNiCnPiCmJiBeC_xHqqkZx_
	// _xZkqqHx_jFjEjFgJiCmMiNoMjAkMiCmMiClNiCnPiCmFiCmNiCmIiCkCiClBiCmGiCmJjCiNiInDiBeC_xHqqkZx_
	pDoc->SessionBegin();

	if (pObj0->GetPenRegister() == FD_PEN_REGISTER_UNUSE &&
		pObj1->GetPenRegister() == FD_PEN_REGISTER_UNUSE &&
		pObj0->GetPenBackSColor() != FD_S_COLOR_UNUSE &&
		pObj1->GetPenBackSColor() != FD_S_COLOR_UNUSE)
	{
		ColorRefID cref0 = pEnv->scid2cref(pObj0->GetPenBackSColor());
		ColorRefID cref1 = pEnv->scid2cref(pObj1->GetPenBackSColor());
		long lRed   = D2L(GetRValue(cref0) * dC1 + GetRValue(cref1) * dC2);
		long lGreen = D2L(GetGValue(cref0) * dC1 + GetGValue(cref1) * dC2);
		long lBlue  = D2L(GetBValue(cref0) * dC1 + GetBValue(cref1) * dC2);
		SColorID scidPenBackSColor = FindSColor(RGB(lRed, lGreen, lBlue));
		if (scidPenBackSColor == FD_S_COLOR_UNSPECIFY)
		{
			FCSColorRec screc;
			screc.m_crRef = RGB(lRed, lGreen, lBlue);
			swprintf(screc.m_szName, L"%s%d", PG_COLOR_NAME, m_lColorNameCount++);
			pDoc->CmdInsert1SColor(scidPenBackSColor, screc);
		}
		// _xZkqqHx_jAfGiClFiCkCjFjEjFgJiCmJjAeGiCpAjAnNjCoIiBeC_xHqqkZx_
		pNew->SetPenBackSColor(scidPenBackSColor);
	}

	if (pObj0->GetPenRegister() == FD_PEN_REGISTER_UNUSE &&
		pObj1->GetPenRegister() == FD_PEN_REGISTER_UNUSE)
	{
		fmmetol mmfPenWeight0 = pObj0->GetPenWeight();
		fmmetol mmfPenWeight1 = pObj1->GetPenWeight();
		fmmetol mmfPenWeight = fmmetol(mmfPenWeight0 * dA1 + mmfPenWeight1 * dA2);
		// _xZkqqHx_jAfGiClFiCkCjFjEjFgJiCmJiDhJiDjDjFjNiCpAjAnNjCoIiBeC_xHqqkZx_
		pNew->SetPenWeight(mmfPenWeight);
	}

	if (pObj0->GetBrushRegister() == FD_BRUSH_REGISTER_UNUSE &&
		pObj1->GetBrushRegister() == FD_BRUSH_REGISTER_UNUSE &&
		pObj0->GetBrushBackSColor() != FD_S_COLOR_UNUSE &&
		pObj1->GetBrushBackSColor() != FD_S_COLOR_UNUSE)
	{
		ColorRefID cref0 = pEnv->scid2cref(pObj0->GetBrushBackSColor());
		ColorRefID cref1 = pEnv->scid2cref(pObj1->GetBrushBackSColor());
		long lRed   = D2L(GetRValue(cref0) * dC1 + GetRValue(cref1) * dC2);
		long lGreen = D2L(GetGValue(cref0) * dC1 + GetGValue(cref1) * dC2);
		long lBlue  = D2L(GetBValue(cref0) * dC1 + GetBValue(cref1) * dC2);
		SColorID scidBrushBackSColor = FindSColor(RGB(lRed, lGreen, lBlue));
		if (scidBrushBackSColor == FD_S_COLOR_UNSPECIFY)
		{
			FCSColorRec screc;
			screc.m_crRef = RGB(lRed, lGreen, lBlue);
			swprintf(screc.m_szName, L"%s%d", PG_COLOR_NAME, m_lColorNameCount++);
			pDoc->CmdInsert1SColor(scidBrushBackSColor, screc);
		}
		// _xZkqqHx_jAfGiClFiCkCjFjEjFgJiCmJjAeGiCpAjAnNjCoIiBeC_xHqqkZx_
		pNew->SetBrushBackSColor(scidBrushBackSColor);
	}

	if (pObj0->GetBrushRegister() == FD_BRUSH_REGISTER_UNUSE &&
		pObj1->GetBrushRegister() == FD_BRUSH_REGISTER_UNUSE &&
		pObj0->GetBrushForeSColor() != FD_S_COLOR_UNUSE &&
		pObj1->GetBrushForeSColor() != FD_S_COLOR_UNUSE)
	{
		ColorRefID cref0 = pEnv->scid2cref(pObj0->GetBrushForeSColor());
		ColorRefID cref1 = pEnv->scid2cref(pObj1->GetBrushForeSColor());
		long lRed   = D2L(GetRValue(cref0) * dC1 + GetRValue(cref1) * dC2);
		long lGreen = D2L(GetGValue(cref0) * dC1 + GetGValue(cref1) * dC2);
		long lBlue  = D2L(GetBValue(cref0) * dC1 + GetBValue(cref1) * dC2);
		SColorID scidBrushForeSColor = FindSColor(RGB(lRed, lGreen, lBlue));
		if (scidBrushForeSColor == FD_S_COLOR_UNSPECIFY)
		{
			FCSColorRec screc;
			screc.m_crRef = RGB(lRed, lGreen, lBlue);
			swprintf(screc.m_szName, L"%s%d", PG_COLOR_NAME, m_lColorNameCount++);
			pDoc->CmdInsert1SColor(scidBrushForeSColor, screc);
		}
		// _xZkqqHx_jAfGiClFiCkCjFjEjFgJiCmJjAeGiCpAjAnNjCoIiBeC_xHqqkZx_
		pNew->SetBrushForeSColor(scidBrushForeSColor);
	}

	// _xZkqqHx_iLeMjIfOiDfKiDgCiDfGiDiHiDjDiCmMiPeJjHlJiBeC_xHqqkZx_
	pDoc->SessionEnd();

	// _xZkqqHx_iDgFiDeMiDfIiDgHiCkKjHeMiCoJiPoKiNiHiCmNiBeBiDgFiDeMiDfIiDgHiCmMjAeGiCpAiDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiBeC_xHqqkZx_
	GradationRichText(pNew, pObj0, pObj1, dC1);

	return TRUE;
} // CA::GradationFigure.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GradationLine
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jClMjApMjFjEjFgJiCmMiDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pObj0	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_0_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			pObj1	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			dA1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBiImKjChFiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dC1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBjAeGiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsTest	:_xZkqqHx_jFoCiKnEjFjEjFgJiNoMjAkMiJmCjEfMiCmMiDgFiDfIiDgHiCmMiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCpAjFnEiClHiBeCiDgFiDfIiDgHiCmMiPoKiNiHiCmNiBeBiNoMjAkMiJmCjEfMiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CA::GradationLine (FCObjLine* pNew,
						const FCObjLine* pObj0,
						const FCObjLine* pObj1,
						double dA1, double dC1,
						BOOL bIsTest)
{
	double dA2 = 1.0 -  dA1;
	double dC2 = 1.0 -  dC1;
	// _xZkqqHx_iPoDiImKiDeOiDiJiDfIiCmMiPiIjHjNiBeC_xHqqkZx_
	if (!GradationFigure(pNew, pObj0, pObj1, dA1, dC1, bIsTest))
		return FALSE;
	//----- _xZkqqHx_iDgFiDfIiDgHiCmMiPoKiNiH_xHqqkZx_ -----
	if (bIsTest) return TRUE;

	DBLPoint mmptFrom0;
	DBLPoint mmptTo0;
	DBLPoint mmptFrom1;
	DBLPoint mmptTo1;
	pObj0->GetPoints(mmptFrom0, mmptTo0);
	pObj1->GetPoints(mmptFrom1, mmptTo1);
	DBLPoint mmptFromN;
	DBLPoint mmptToN;
	mmptFromN.x = mmptFrom0.x * dA1 + mmptFrom1.x * dA2;
	mmptFromN.y = mmptFrom0.y * dA1 + mmptFrom1.y * dA2;
	mmptToN.x = mmptTo0.x * dA1 + mmptTo1.x * dA2;
	mmptToN.y = mmptTo0.y * dA1 + mmptTo1.y * dA2;

	pNew->SetFromEndX(mmptFromN.x);
	pNew->SetFromEndY(mmptFromN.y);
	pNew->SetToEndX(mmptToN.x);
	pNew->SetToEndY(mmptToN.y);
	return TRUE;
} // CA::GradationLine.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GradationRect
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iLoJiMgAjFjEjFgJiCmMiDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pObj0	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_0_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			pObj1	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			dA1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBiImKjChFiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dC1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBjAeGiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsTest	:_xZkqqHx_jFoCiKnEjFjEjFgJiNoMjAkMiJmCjEfMiCmMiDgFiDfIiDgHiCmMiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCpAjFnEiClHiBeCiDgFiDfIiDgHiCmMiPoKiNiHiCmNiBeBiNoMjAkMiJmCjEfMiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CA::GradationRect (FCObjRect* pNew,
						const FCObjRect* pObj0,
						const FCObjRect* pObj1,
						double dA1, double dC1,
						BOOL bIsTest)
{
	double dA2 = 1.0 -  dA1;
	double dC2 = 1.0 -  dC1;
	// _xZkqqHx_iPoDiImKiDeOiDiJiDfIiCmMiPiIjHjNiBeC_xHqqkZx_
	if (!GradationFigure(pNew, pObj0, pObj1, dA1, dC1, bIsTest))
		return FALSE;
	//----- _xZkqqHx_iDgFiDfIiDgHiCmMiPoKiNiH_xHqqkZx_ -----
	if (bIsTest) return TRUE;

	mmetol	mmHAxisX0	= pObj0->GetHAxisX();	// _xZkqqHx_jAhNiMgAiCmMjAiFjFlNiOlCiCmMjBoFiCkLiClDiBeC_xHqqkZx_
	mmetol	mmVAxisX0	= pObj0->GetVAxisX();	// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_X_xZkqqHx_jAkMjFkKiBeC_xHqqkZx_
	mmetol	mmVAxisY0	= pObj0->GetVAxisY();	// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_Y_xZkqqHx_jAkMjFkKiBeC_xHqqkZx_
	mmetol	mmCenterX0	= pObj0->GetCenterX();	// _xZkqqHx_jAhNiMgAiCmMjCiGjAfDjDfPiCmMiNmAjFfHiBeC_xHqqkZx_
	mmetol	mmCenterY0	= pObj0->GetCenterY();	// _xZkqqHx_jAhNiMgAiCmMjCiGjAfDjDfPiCmMiNmAjFfHiBeC_xHqqkZx_
	double	dAngle0		= pObj0->GetAngle();	// _xZkqqHx_jAhNiMgAiCmMiJpBjDfNiKhAjDhIiBeC_xHqqkZx_

	mmetol	mmHAxisX1	= pObj1->GetHAxisX();	// _xZkqqHx_jAhNiMgAiCmMjAiFjFlNiOlCiCmMjBoFiCkLiClDiBeC_xHqqkZx_
	mmetol	mmVAxisX1	= pObj1->GetVAxisX();	// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_X_xZkqqHx_jAkMjFkKiBeC_xHqqkZx_
	mmetol	mmVAxisY1	= pObj1->GetVAxisY();	// _xZkqqHx_jAhNiMgAiCmMjAiCjClMiOlCiCmM_xHqqkZx_Y_xZkqqHx_jAkMjFkKiBeC_xHqqkZx_
	mmetol	mmCenterX1	= pObj1->GetCenterX();	// _xZkqqHx_jAhNiMgAiCmMjCiGjAfDjDfPiCmMiNmAjFfHiBeC_xHqqkZx_
	mmetol	mmCenterY1	= pObj1->GetCenterY();	// _xZkqqHx_jAhNiMgAiCmMjCiGjAfDjDfPiCmMiNmAjFfHiBeC_xHqqkZx_
	double	dAngle1		= pObj1->GetAngle();	// _xZkqqHx_jAhNiMgAiCmMiJpBjDfNiKhAjDhIiBeC_xHqqkZx_

	mmetol	mmHAxisX	= mmHAxisX0 * dA1 + mmHAxisX1 * dA2;
	mmetol	mmVAxisX	= mmVAxisX0 * dA1 + mmVAxisX1 * dA2;
	mmetol	mmVAxisY	= mmVAxisY0 * dA1 + mmVAxisY1 * dA2;
	mmetol	mmCenterX	= mmCenterX0 * dA1 + mmCenterX1 * dA2;
	mmetol	mmCenterY	= mmCenterY0 * dA1 + mmCenterY1 * dA2;
	double	dAngle		= dAngle0 * dA1 + dAngle1 * dA2;

	pNew->SetHAxisX(mmHAxisX);
	pNew->SetVAxisX(mmVAxisX);
	pNew->SetVAxisY(mmVAxisY);
	pNew->SetCenterX(mmCenterX);
	pNew->SetCenterY(mmCenterY);
	pNew->SetAngle(dAngle);
	return TRUE;
} // CA::GradationRect.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GradationRoundRect
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iKhAiKnLiLoJiMgAjFjEjFgJiCmMiDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pObj0	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_0_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			pObj1	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			dA1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBiImKjChFiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dC1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBjAeGiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsTest	:_xZkqqHx_jFoCiKnEjFjEjFgJiNoMjAkMiJmCjEfMiCmMiDgFiDfIiDgHiCmMiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCpAjFnEiClHiBeCiDgFiDfIiDgHiCmMiPoKiNiHiCmNiBeBiNoMjAkMiJmCjEfMiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CA::GradationRoundRect (	FCObjRoundRect* pNew,
								const FCObjRoundRect* pObj0,
								const FCObjRoundRect* pObj1,
								double dA1, double dC1,
								BOOL bIsTest)
{
	double dA2 = 1.0 -  dA1;
	double dC2 = 1.0 -  dC1;
	// _xZkqqHx_iKhAiKnLiCmMiMfOiCkKiInJiCmIiCoJiPoKiNiHiCmNiCmIiClFiBeC_xHqqkZx_
	if (pObj0->GetRoundType() != pObj1->GetRoundType())
		return FALSE;
	// _xZkqqHx_iPoDiImKiDeOiDiJiDfIiCmMiPiIjHjNiBeC_xHqqkZx_
	if (!GradationRect(pNew, pObj0, pObj1, dA1, dC1, bIsTest))
		return FALSE;
	//----- _xZkqqHx_iDgFiDfIiDgHiCmMiPoKiNiH_xHqqkZx_ -----
	if (bIsTest) return TRUE;

	mmetol mmRoundX0 = pObj0->GetRoundX();	// _xZkqqHx_iKhAiCmMiCfDjFkKiCmMiCfAiJhOiCmMjElMiMgBiBgJ_xHqqkZx_X_xZkqqHx_jFpLiMpMiBgKiBeC_xHqqkZx_
	mmetol mmRoundY0 = pObj0->GetRoundY();	// _xZkqqHx_iKhAiCmMiCfDjFkKiCmMiCfAiJhOiCmMjElMiMgBiBgJ_xHqqkZx_Y_xZkqqHx_jFpLiMpMiBgKiBeC_xHqqkZx_
	mmetol mmRoundX1 = pObj1->GetRoundX();	// _xZkqqHx_iKhAiCmMiCfDjFkKiCmMiCfAiJhOiCmMjElMiMgBiBgJ_xHqqkZx_X_xZkqqHx_jFpLiMpMiBgKiBeC_xHqqkZx_
	mmetol mmRoundY1 = pObj1->GetRoundY();	// _xZkqqHx_iKhAiCmMiCfDjFkKiCmMiCfAiJhOiCmMjElMiMgBiBgJ_xHqqkZx_Y_xZkqqHx_jFpLiMpMiBgKiBeC_xHqqkZx_
	mmetol mmRoundX = mmRoundX0 * dA1 + mmRoundX1 * dA2;
	mmetol mmRoundY = mmRoundY0 * dA1 + mmRoundY1 * dA2;
	pNew->SetRoundX(mmRoundX);
	pNew->SetRoundY(mmRoundY);
	return TRUE;
} // CA::GradationRoundRect.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	RegulateAngle
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iKhAjDhIiCpA_xHqqkZx_[0.0, 2.0)_xZkqqHx_iCmJjEfLiCnPiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dR	:_xZkqqHx_iKhAjDhIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jFmPiNfIiClFiClNjCgMiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.04 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
inline double RegulateAngle (double dR)
{
	while (dR < 0.0) dR += 2.0;
	while (2.0 <= dR) dR -= 2.0;
	return dR;
} // RegulateAngle.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GradationArc
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iJhOiMmKjFjEjFgJiCmMiDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pObj0	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_0_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			pObj1	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			dA1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBiImKjChFiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dC1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBjAeGiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsTest	:_xZkqqHx_jFoCiKnEjFjEjFgJiNoMjAkMiJmCjEfMiCmMiDgFiDfIiDgHiCmMiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCpAjFnEiClHiBeCiDgFiDfIiDgHiCmMiPoKiNiHiCmNiBeBiNoMjAkMiJmCjEfMiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CA::GradationArc (	FCObjArc* pNew,
						const FCObjArc* pObj0,
						const FCObjArc* pObj1,
						double dA1, double dC1,
						BOOL bIsTest)
{
	double dA2 = 1.0 -  dA1;
	double dC2 = 1.0 -  dC1;
	// _xZkqqHx_iJhOiMmKiCmMiMfOiCkKiInJiCmIiCoJiPoKiNiHiCmNiCmIiClFiBeC_xHqqkZx_
	if (pObj0->GetArcType() != pObj1->GetArcType())
		return FALSE;
	// _xZkqqHx_iPoDiImKiDeOiDiJiDfIiCmMiPiIjHjNiBeC_xHqqkZx_
	if (!GradationRect(pNew, pObj0, pObj1, dA1, dC1, bIsTest))
		return FALSE;
	//----- _xZkqqHx_iDgFiDfIiDgHiCmMiPoKiNiH_xHqqkZx_ -----
	if (bIsTest) return TRUE;

	double	dArcBgnR0 = pObj0->GetArcBgnR();	// _xZkqqHx_iJhOiCmMiKeKiOgOiKhAiBeC_xHqqkZx_
	double	dArcEndR0 = pObj0->GetArcEndR();	// _xZkqqHx_iJhOiCmMiPeJjHlJiKhAiBeC_xHqqkZx_
	if (dArcBgnR0 == dArcEndR0) dArcEndR0 += 2.0;
	double	dArcBgnR1 = pObj1->GetArcBgnR();	// _xZkqqHx_iJhOiCmMiKeKiOgOiKhAiBeC_xHqqkZx_
	double	dArcEndR1 = pObj1->GetArcEndR();	// _xZkqqHx_iJhOiCmMiPeJjHlJiKhAiBeC_xHqqkZx_
	if (dArcBgnR1 == dArcEndR1) dArcEndR1 += 2.0;

	double	dArcBgnR = RegulateAngle(dArcBgnR0 * dA1 + dArcBgnR1 * dA2);
	double	dArcEndR = RegulateAngle(dArcEndR0 * dA1 + dArcEndR1 * dA2);

	pNew->SetArcBgnR(dArcBgnR);
	pNew->SetArcEndR(dArcEndR);
	return TRUE;
} // CA::GradationArc.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GradationPoly
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jBlNiKhAjApMjFjEjFgJiCmMiDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pObj0	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_0_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			pObj1	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			dA1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBiImKjChFiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dC1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBjAeGiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsTest	:_xZkqqHx_jFoCiKnEjFjEjFgJiNoMjAkMiJmCjEfMiCmMiDgFiDfIiDgHiCmMiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCpAjFnEiClHiBeCiDgFiDfIiDgHiCmMiPoKiNiHiCmNiBeBiNoMjAkMiJmCjEfMiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CA::GradationPoly (FCObjPoly* pNew,
						const FCObjPoly* pObj0,
						const FCObjPoly* pObj1,
						double dA1, double dC1,
						BOOL bIsTest)
{
	double dA2 = 1.0 -  dA1;
	double dC2 = 1.0 -  dC1;
	// _xZkqqHx_iDhMiDiKiDfDiDjDiCkKjFmCiClGiCmEiCkCiCoJiCkJiKeKiCkCiCmEiCkCiCoJiCkJiCkKjDkPiClGiCmFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
	if (pObj0->GetIsOpenPolyJoint() != pObj1->GetIsOpenPolyJoint())
		return FALSE;
	// _xZkqqHx_jIeBiMiLjDfPjAjEiCkKjDkPiClGiCmFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
	if (pObj0->GetJointSize() != pObj1->GetJointSize())
		return FALSE;
	// _xZkqqHx_jBfDiCmEiCmMjIeBiMiLjDfPiCmMiDfOiDeDiDhGiCkKjDkPiClGiCmFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
	long lC;
	for (lC = 0; lC < pObj0->GetJointSize(); lC++)
		if (pObj0->GetJoint(lC).m_nType != pObj1->GetJoint(lC).m_nType)
		return FALSE;
	// _xZkqqHx_iPoDiImKiDeOiDiJiDfIiCmMiPiIjHjNiBeC_xHqqkZx_
	if (!GradationFigure(pNew, pObj0, pObj1, dA1, dC1, bIsTest))
		return FALSE;
	//----- _xZkqqHx_iDgFiDfIiDgHiCmMiPoKiNiH_xHqqkZx_ -----
	if (bIsTest) return TRUE;

	for (lC = 0; lC < pObj0->GetJointSize(); lC++)
	{
		DBLPoint mmptPivot;	// _xZkqqHx_iDeKiDgJiDiBjDfP_xHqqkZx_.
		DBLPoint mmptPrev;	// _xZkqqHx_jBePiIpIjDfP_xHqqkZx_(_xZkqqHx_iDeKiDgJiDiBjDfPiCkJiCoHiCmMjBiKjBmOiNmAjFfH_xHqqkZx_).
		DBLPoint mmptNext;	// _xZkqqHx_iMoDiIpIjDfP_xHqqkZx_(_xZkqqHx_iDeKiDgJiDiBjDfPiCkJiCoHiCmMjBiKjBmOiNmAjFfH_xHqqkZx_).
		mmptPivot.x = pObj0->GetJoint(lC).m_mmptPivot.x * dA1 +
						pObj1->GetJoint(lC).m_mmptPivot.x * dA2;
		mmptPivot.y = pObj0->GetJoint(lC).m_mmptPivot.y * dA1 +
						pObj1->GetJoint(lC).m_mmptPivot.y * dA2;
		mmptPrev.x = pObj0->GetJoint(lC).m_mmptPrev.x * dA1 +
						pObj1->GetJoint(lC).m_mmptPrev.x * dA2;
		mmptPrev.y = pObj0->GetJoint(lC).m_mmptPrev.y * dA1 +
						pObj1->GetJoint(lC).m_mmptPrev.y * dA2;
		mmptNext.x = pObj0->GetJoint(lC).m_mmptNext.x * dA1 +
						pObj1->GetJoint(lC).m_mmptNext.x * dA2;
		mmptNext.y = pObj0->GetJoint(lC).m_mmptNext.y * dA1 +
						pObj1->GetJoint(lC).m_mmptNext.y * dA2;

		pNew->GetJoint(lC).m_mmptPivot = mmptPivot;
		pNew->GetJoint(lC).m_mmptPrev = mmptPrev;
		pNew->GetJoint(lC).m_mmptNext = mmptNext;
	}
	return TRUE;
} // CA::GradationPoly.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GradationWidePoly
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjNiNeMjBlNiKhAjApMjFjEjFgJiCmMiDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pObj0	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_0_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			pObj1	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			dA1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBiImKjChFiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dC1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBjAeGiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsTest	:_xZkqqHx_jFoCiKnEjFjEjFgJiNoMjAkMiJmCjEfMiCmMiDgFiDfIiDgHiCmMiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCpAjFnEiClHiBeCiDgFiDfIiDgHiCmMiPoKiNiHiCmNiBeBiNoMjAkMiJmCjEfMiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CA::GradationWidePoly (FCObjWidePoly* pNew,
							const FCObjWidePoly* pObj0,
							const FCObjWidePoly* pObj1,
							double dA1, double dC1,
							BOOL bIsTest)
{
	double dA2 = 1.0 -  dA1;
	double dC2 = 1.0 -  dC1;
	// _xZkqqHx_iDfIiDiNiBfLiDhGiCmMiDfOiDeDiDhGiCkKjDkPiClGiCmFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
	if (pObj0->GetWidthSlopeF() != pObj1->GetWidthSlopeF())
		return FALSE;
	if (pObj0->GetWidthSlopeB() != pObj1->GetWidthSlopeB())
		return FALSE;

	// _xZkqqHx_iPoDiImKiDeOiDiJiDfIiCmMiPiIjHjNiBeC_xHqqkZx_
	if (!GradationPoly(pNew, pObj0, pObj1, dA1, dC1, bIsTest))
		return FALSE;
	//----- _xZkqqHx_iDgFiDfIiDgHiCmMiPoKiNiH_xHqqkZx_ -----
	if (bIsTest) return TRUE;

	mmetol mmPolyWidthF = pObj0->GetPolyWidthF() * dA1 + pObj1->GetPolyWidthF() * dA2;
	mmetol mmPolyWidthB = pObj0->GetPolyWidthB() * dA1 + pObj1->GetPolyWidthB() * dA2;

	pNew->SetPolyWidthF(mmPolyWidthF);
	pNew->SetPolyWidthB(mmPolyWidthB);

	return TRUE;
} // CA::GradationWidePoly.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CA::GradationGroup
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDePiDiLiBfLiDhGjFjEjFgJiCmMiDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCpAiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pObj0	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_0_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			pObj1	:_xZkqqHx_jFoCiKnEjBmOiPnLiCmMjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCpAiOhHjCoIiBeCjFjEjFgJ_xHqqkZx_1_xZkqqHx_iCoGiCoIiJlKiCmJiCkAiCoJiBeC_xHqqkZx_
 *			dA1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBiImKjChFiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dC1		:_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCmMiBeBjAeGiCmMiKiEiNiHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsTest	:_xZkqqHx_jFoCiKnEjFjEjFgJiNoMjAkMiJmCjEfMiCmMiDgFiDfIiDgHiCmMiPoKiNiHiCmN_xHqqkZx_TRUE_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAfGiLeLjFoCiKnEjFjEjFgJiCpAjFnEiClHiBeCiDgFiDfIiDgHiCmMiPoKiNiHiCmNiBeBiNoMjAkMiJmCjEfMiCkJiCmHiCkEiCkJiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.03.22 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CA::GradationGroup (	FCObjGroup* pNew,
							const FCObjGroup* pObj0,
							const FCObjGroup* pObj1,
							double dA1, double dC1,
							BOOL bIsTest)
{
	// _xZkqqHx_iDiBiDjDiDgPiBfLjAjEiCmNjDkPiClGiCmFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
	if (pObj0->GetMemberSize() != pObj1->GetMemberSize())
		return FALSE;
	// _xZkqqHx_iKgFiDiBiDjDiDgPiBfLiCmMiDfOiDeDiDhGiCmNjDkPiClGiCmFiCmIiCkPiCoKiCmOiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
	long lIndex;
	for (lIndex = 0; lIndex != pObj0->GetMemberSize(); lIndex++)
		if (pObj0->GetMember(lIndex)->Type() != pObj1->GetMember(lIndex)->Type())
			return FALSE;

	// _xZkqqHx_iDePiDiJiDgGiBfLiDfGiDiHiDjDiPiIjHjNiCkKjAkMiMpHiClFiClNiCkJiBeI_xHqqkZx_
	BOOL bSucceed = FALSE;
	for (lIndex = 0; lIndex != pObj0->GetMemberSize(); lIndex++)
	{
		FCObjDynabase* pNewMember = NULL;
		if (pNew != NULL)
			pNewMember = pNew->GetMember(lIndex);

		switch (pObj0->GetMember(lIndex)->Type())
		{
		case FDOJ_LINE:
			bSucceed = GradationLine((FCObjLine*)pNewMember, (FCObjLine*)pObj0->GetMember(lIndex), (FCObjLine*)pObj1->GetMember(lIndex), dA1, dC1, bIsTest);
			break;
		case FDOJ_RECT:
			bSucceed = GradationRect((FCObjRect*)pNewMember, (FCObjRect*)pObj0->GetMember(lIndex), (FCObjRect*)pObj1->GetMember(lIndex), dA1, dC1, bIsTest);
			break;
		case FDOJ_ROUND_RECT:
			bSucceed = GradationRoundRect((FCObjRoundRect*)pNewMember, (FCObjRoundRect*)pObj0->GetMember(lIndex), (FCObjRoundRect*)pObj1->GetMember(lIndex), dA1, dC1, bIsTest);
			break;
		case FDOJ_ARC:
			bSucceed = GradationArc((FCObjArc*)pNewMember, (FCObjArc*)pObj0->GetMember(lIndex), (FCObjArc*)pObj1->GetMember(lIndex), dA1, dC1, bIsTest);
			break;
		case FDOJ_POLY:
			bSucceed = GradationPoly((FCObjPoly*)pNewMember, (FCObjPoly*)pObj0->GetMember(lIndex), (FCObjPoly*)pObj1->GetMember(lIndex), dA1, dC1, bIsTest);
			break;
		case FDOJ_WIDE_POLY:
			bSucceed = GradationWidePoly((FCObjWidePoly*)pNewMember, (FCObjWidePoly*)pObj0->GetMember(lIndex), (FCObjWidePoly*)pObj1->GetMember(lIndex), dA1, dC1, bIsTest);
			break;
		case FDOJ_GROUP:
			bSucceed = GradationGroup((FCObjGroup*)pNewMember, (FCObjGroup*)pObj0->GetMember(lIndex), (FCObjGroup*)pObj1->GetMember(lIndex), dA1, dC1, bIsTest);
			break;
		default:
			bSucceed = FALSE;
		}
		if (!bSucceed)
			break;

		if (!bIsTest)
		//----- _xZkqqHx_iDgFiDfIiDgHiCmFiCmNiCmIiCkCiPoKiNiH_xHqqkZx_ -----
		{
			pNewMember->CalcResizeFrame();
		}
	}
	return bSucceed;
} // CA::GradationGroup.

