// TolBrPenBrush.cpp : _xZkqqHx_iDeDiDjDiDhGiDiKiDiBiDjDiDgFiBfLiDfGiDiHiDjD_xHqqkZx_ _xZkqqHx_iDhEiDeAiDeDiDiL_xHqqkZx_
//

#include "stdafx.h"
#include "DynamicDraw.h"
//#include "RegData.h"			// For GetRegFontStatic.
#include "DynamicDrawView.h"	// For g_pView.
#include "FoundDoc.h"			// For g_pDoc.
#include "ObjFigure.h"			// For FCPenRec.etc.
#include "ToolBase.h"			// For IsEditingText.
#include "UtilWin.h"			// For FFHorznizeToolBar.
#include "FrameWnd.h"			// For FFGetMainWnd().
#include "TolBrPenBrush.h"		// This header.

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

// _xZkqqHx_iDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
static const int s_nBoxWidth = 58;
//----- 05.08.10 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
//static const int s_nDroppedWidth = 250;
//----- 05.08.10 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_
static const int s_nDroppedHeight = 500;

// _xZkqqHx_iDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
static const int s_nBoxWidth2 = 80;
//----- 05.08.10 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
//static const int s_nDroppedWidth2 = 250;
//----- 05.08.10 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_
static const int s_nDroppedHeight2 = 500;

/////////////////////////////////////////////////////////////////////////////
// CFCTolBrPenBrush

CFCTolBrPenBrush::CFCTolBrPenBrush ()
{
} // CFCTolBrPenBrush::CFCTolBrPenBrush.

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


BEGIN_MESSAGE_MAP(CFCTolBrPenBrush, BASE_CLASS)
	//{{AFX_MSG_MAP(CFCTolBrPenBrush)
		// _xZkqqHx_iDiBiDiC_xHqqkZx_ - ClassWizard _xZkqqHx_iCmNiClBiCmMiImKjChFiCmJiDhNiDgCiDhDiDjDiDePjHhAiCmMiDhNiDeOiDiNiCpAjCmHiJmBiCnMiClNiCmNiNoNiPjMiClFiCnMiClHiBeC_xHqqkZx_
	//}}AFX_MSG_MAP
	ON_CONTROL(CBBN_SELCHANGE, ID_CMB_OBJ_PEN_COLOR, OnSelchangeCmbObjPenColor)
	ON_CONTROL(CBBN_SELCHANGE, ID_CMB_OBJ_PEN_STYLE, OnSelchangeCmbObjPenStyle)
	ON_CONTROL(CBBN_SELCHANGE, ID_CMB_OBJ_PEN_WEIGHT, OnSelchangeCmbObjPenWeight)
	ON_CONTROL(CBBN_SELCHANGE, ID_CMB_OBJ_REG_PEN, OnSelchangeCmbObjRegPen)
	ON_CONTROL(CBBN_SELCHANGE, ID_CMB_OBJ_BRUSH_COLOR, OnSelchangeCmbObjBrushColor)
	ON_CONTROL(CBBN_SELCHANGE, ID_CMB_OBJ_REG_BRUSH, OnSelchangeCmbObjRegBrush)
	ON_MESSAGE(WM_USER_CMB_BOX_ON_KEY, OnUserCmbBoxOnKey)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFCTolBrPenBrush _xZkqqHx_iDiGiBfLiDfFiKnGjAjEiBeC_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	myCollectObjects
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJiCkJiCoHiBeBiDiBiDjDiDgPjFjEjFgJiCoAiKnMiCnPiCmEjBfDiCmEiCpAiPfHiCnPiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.07.25 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
static void myCollectObjects (ObjDynabaseSet& stObj, const ObjDynabaseVector& vObj)
{
	ObjDynabaseVector::const_iterator iObj;
	for (iObj = vObj.begin(); iObj != vObj.end(); iObj++)
	{
		ObjDynabaseVector vSubObj;
		(*iObj)->GetMembers(vSubObj);
		stObj.insert(*iObj);
		myCollectObjects(stObj, vSubObj);
	}
} // myCollectObjects.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::Initialize
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iPiJiKpKiJlLiPiIjHjNiCpAiNhDiCkEiBeCiDgDiBfLiDiLiDgPiBfLiCmJjBgHiCnNiNjOiCnMiCoKiClNiDfCiDjDiDhLiDhLiDgCiDeOiDfIiCpA_xHqqkZx_
 *			_xZkqqHx_iPiJiKpKiJlLiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jAlDiPoNiPeJjHlJiCmMiPoKiNiHiCmN_xHqqkZx_ TRUE_xZkqqHx_iBeBiDeHiDiJiBfLiCmMiPoKiNiHiCmN_xHqqkZx_ FALSE _xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.03.01 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL CFCTolBrPenBrush::Initialize ()
{
	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	if (!BASE_CLASS::Initialize()) return FALSE;

//----- 05.06.29 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//	// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_
//	const int nDropHeight = 500;
//	CRect rect;
//	int iHeight;
//
//	struct {
//		CFCCmbBase*	pCmb;
//		DWORD		dwID;
//	} data[] = {
//		{ &m_cbbPenColor,  ID_CMB_OBJ_PEN_COLOR },
//		{ &m_cbbSolidBrush,ID_CMB_OBJ_BRUSH_COLOR },
//		{ &m_cbbRegPen,    ID_CMB_OBJ_REG_PEN },
//		{ &m_cbbRegBrush,  ID_CMB_OBJ_REG_BRUSH } };
//----- 05.06.29 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

//----- 05.06.29 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	for (int idx = 0; idx < 4; idx++)
//	{
//		// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjBhNjDpMiPoKiPiKiBgJjFjNiBgKiCpAiNoMjAkMiClHiCoJiBeC_xHqqkZx_
//		SetButtonInfo(CommandToIndex(data[idx].dwID), data[idx].dwID, TBBS_SEPARATOR, 58);
//		//----- _xZkqqHx_iPiDjAeGiDhJiDjDiDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMiNoMjAkMiBjFiPiJiKpKiJlL_xHqqkZx_ -----
//		// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMiDfEiDeDiDfJiCpAiMhGiOfKiClHiCoJiBeC_xHqqkZx_
//		GetItemRect(idx * 2, &rect);
//		iHeight = rect.Height();
//		rect.top = 0;
//		rect.bottom = rect.top + nDropHeight;
//		// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCpAiNoMjAkMiBeC_xHqqkZx_
//		if (!data[idx].pCmb->Create(WS_VISIBLE|WS_VSCROLL|WS_TABSTOP|
//									CBS_DROPDOWNLIST|CBS_OWNERDRAWFIXED,
//									rect, this, data[idx].dwID))
//		{
//			TRACE(_T("Failed to create combo-box\n"));
//			return FALSE;
//		}
//		// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMiDgIiDiNiDgCiDhGiDfPiDeFiDjDiDiKiDfIiDgHiCmMjFjNiCpAiKgHjCkDjAnNjCoIiBeC_xHqqkZx_
//		data[idx].pCmb->SetDroppedWidth(250);
//		// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmJiDhEiDeIiDjDiDgHiCpAjAnNjCoIiBeC_xHqqkZx_
//		data[idx].pCmb->SetFont(g_pReg->GetRegFontStatic(FDFT_TOOLBAR));
//		// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMiNiCiClDiCpAjAnNjCoIiBeC_xHqqkZx_
//		data[idx].pCmb->SetItemHeight(iHeight - 6);
//		// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMiDgGiBfLiDfOiCpAiNfIjAfGiBeC_xHqqkZx_
//		data[idx].pCmb->UpdateItem();
//	}
//----- 05.06.29 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	for (long lIndex = 0;; lIndex++)
	{
		const FCCmbButtonInfo& info = GetCmbButtonInfo(lIndex);
		if (info.pCmb == NULL) break;
		// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMiDgGiBfLiDfOiCpAiNfIjAfGiBeC_xHqqkZx_
		((CFCCmbBase*)info.pCmb)->UpdateItem();
	}
//----- 05.06.29 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
	// _xZkqqHx_iJpMiNhDiDeMiBfLiCmG_xHqqkZx_ESC_xZkqqHx_iDeMiBfLiCpAiOoGjDlOiCmFiCkLiCoJiCoGiCkEiCmJiClHiCoJiBeC_xHqqkZx_
	m_cbbPenWeight.AddKey(VK_RETURN);
	m_cbbPenWeight.AddKey(VK_ESCAPE);
	// _xZkqqHx_iDhJiDjDjFjNiDhGiDiLiDfPiDeFiDjDiCmJjAjEjCgMiMfOiCpAiOhHjCoIiBeCiDhKiDeDiBfLiDiLiDfIiDeOiDiNiBfLiDiLiOjOiCmJiKiIjHhAiClDiCoKiCoJiBeC_xHqqkZx_
	m_cbbPenWeight.SetIsNumber(TRUE);

	// _xZkqqHx_jAlDiPoNiPeJjHlJiBeC_xHqqkZx_
	return TRUE;
} // CFCTolBrPenBrush::Initialize.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::ObjSelectNotify
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMjBeJjBpAiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJ_xHqqkZx_View_xZkqqHx_iCkJiCoHiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	scidSelPen		:_xZkqqHx_iDhJiDjDjAeGiCpAiOhHjCoIiBeC_xHqqkZx_
 *			scidSelBrush	:_xZkqqHx_iDhFiDiJiDfGjAeGiCpAiOhHjCoIiBeC_xHqqkZx_
 *			pridSelRegPen	:_xZkqqHx_jDgPjIfOiDhJiDjDiCpAiOhHjCoIiBeC_xHqqkZx_
 *			pridSelRegBrush	:_xZkqqHx_jDgPjIfOiDhFiDiJiDfGiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.03.01 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *			01.01.08 Fukushiro M. _xZkqqHx_iIpIjAjEjCmHiJmBiBeC_xHqqkZx_
 *************************************************************************/
void CFCTolBrPenBrush::ObjSelectNotify ()
{
	// _xZkqqHx_iDeFiDeCiDjDiDgIiDeFiDeJiDhFiDfHiDeGiDeOiDgHiCkKjBlGiNnNiClFiCmIiCkCiCmIiCoHiCmOjFjMiLeBiBeCiDeBiDhGiDiKiPeJjHlJiOjOjDjJiCmJiBeC_xHqqkZx_
	if (!::IsWindow(m_hWnd)) return;

	SColorID		scidSelPen = FD_S_COLOR_UNSPECIFY;
	PenStyleID		psidSelPenStyle = FD_PEN_STYLE_UNSPECIFY;
	fmmetol			mmfSelPenWeight = -1.0;
	SColorID		scidSelBrush = FD_S_COLOR_UNSPECIFY;
	PenRegisterID	pridSelRegPen = FD_PEN_REGISTER_UNSPECIFY;
	BrushRegisterID	pridSelRegBrush = FD_BRUSH_REGISTER_UNSPECIFY;

	if (g_pView == NULL) return;

	// _xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJiCkJiCoHiBeBiDiBiDjDiDgPjFjEjFgJiCoAiKnMiCnPiCmEjBfDiCmEiCpAiPfHiCnPiCoJiBeC_xHqqkZx_
	ObjDynabaseSet stObj;
	myCollectObjects(stObj, g_pView->GetCurrentTool()->GetSelectLocalObjVector());

	if (!stObj.empty())
	{
		ObjDynabaseSet::const_iterator iObj;
		//----- _xZkqqHx_iPiDjAeGiDhJiDjDiCmMjAnNjCoI_xHqqkZx_ -----
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			// _xZkqqHx_iDhJiDjDiCpAiOjNiClNiCmIiCkCjFjEjFgJiCmIiCoHiCmOiBeBiOjPiCmMiDiLiBfLiDhGiCnGiBeC_xHqqkZx_
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;

			// _xZkqqHx_iMlLiNnNiCmMiDhJiDjDjAeGiCpAiOoGjDlOiBeCjDgPjIfOiDhJiDjDiCmMiPoKiNiHiCmNjDkHjGlOiCpAiOhHjCoIiBeC_xHqqkZx_
			SColorID scidTmp = FD_S_COLOR_UNUSE;
			if (pObj->GetPenRegister() == FD_PEN_REGISTER_UNUSE)
				scidTmp = pObj->GetPenBackSColor();

			// _xZkqqHx_iDhJiDjDiCpAiOjNiCmCiNmFiPiJiCmMjFjEjFgJiCmIiCoHiCmOiBeBjAeGiCpAiLeMjIfOiBeC_xHqqkZx_
			if (scidSelPen == FD_S_COLOR_UNSPECIFY)
			{
				scidSelPen = scidTmp;
				continue;
			}
			// _xZkqqHx_jBePiMgJjAeGiCkKiInJiCmIiCoKiCmOiBeBiDiLiBfLiDhGiPeJjHlJiBeC_xHqqkZx_
			if (scidSelPen != scidTmp)
			{
				scidSelPen = FD_S_COLOR_UNSPECIFY;
				break;
			}
		}
//----- 05.07.04 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
		//----- _xZkqqHx_iDhJiDjDiDfIiDfOiDeDiDiLiCmMjAnNjCoI_xHqqkZx_ -----
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			// _xZkqqHx_iDhJiDjDiCpAiOjNiClNiCmIiCkCjFjEjFgJiCmIiCoHiCmOiBeBiOjPiCmMiDiLiBfLiDhGiCnGiBeC_xHqqkZx_
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;

			// _xZkqqHx_iMlLiNnNiCmMiDhJiDjDiDfIiDfOiDeDiDiLiCpAiOoGjDlOiBeCjDgPjIfOiDhJiDjDiCmMiPoKiNiHiCmNjGkCiOgHjHhAiCpAiOhHjCoIiBeC_xHqqkZx_
			PenStyleID psidTmp = FD_PEN_STYLE_UNUSE;
			if (pObj->GetPenRegister() == FD_PEN_REGISTER_UNUSE)
				psidTmp = pObj->GetPenStyle();

			// _xZkqqHx_iDhJiDjDiCpAiOjNiCmCiNmFiPiJiCmMjFjEjFgJiCmIiCoHiCmOiBeBiDfIiDfOiDeDiDiLiCpAiLeMjIfOiBeC_xHqqkZx_
			if (psidSelPenStyle == FD_PEN_STYLE_UNSPECIFY)
			{
				psidSelPenStyle = psidTmp;
				continue;
			}
			// _xZkqqHx_iDfIiDfOiDeDiDiLiCkKiInJiCmIiCoKiCmOiBeBiDiLiBfLiDhGiPeJjHlJiBeC_xHqqkZx_
			if (psidSelPenStyle != psidTmp)
			{
				psidSelPenStyle = FD_PEN_STYLE_UNSPECIFY;
				break;
			}
		}
		//----- _xZkqqHx_iDhJiDjDjFjNiCmMjAnNjCoI_xHqqkZx_ -----
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			// _xZkqqHx_iDhJiDjDiCpAiOjNiClNiCmIiCkCjFjEjFgJiCmIiCoHiCmOiBeBiOjPiCmMiDiLiBfLiDhGiCnGiBeC_xHqqkZx_
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;

			// _xZkqqHx_iMlLiNnNiCmMiDhJiDjDjFjNiCpAiOoGjDlOiBeCjDgPjIfOiDhJiDjDiCmMiPoKiNiHiCmN_xHqqkZx_-1.0_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
			fmmetol mmfTmp = -1.0;
			if (pObj->GetPenRegister() == FD_PEN_REGISTER_UNUSE)
				mmfTmp = pObj->GetPenWeight();

			// _xZkqqHx_iDhJiDjDiCpAiOjNiCmCiNmFiPiJiCmMjFjEjFgJiCmIiCoHiCmOiBeBjFjNiCpAiLeMjIfOiBeC_xHqqkZx_
			if (mmfSelPenWeight == -1.0)
			{
				mmfSelPenWeight = mmfTmp;
				continue;
			}
			// _xZkqqHx_jFjNiCkKiInJiCmIiCoKiCmOiBeBiDiLiBfLiDhGiPeJjHlJiBeC_xHqqkZx_
			if (!rougheq(mmfSelPenWeight, mmfTmp))
			{
				mmfSelPenWeight = -1.0;
				break;
			}
		}
//----- 05.07.04 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

		//----- _xZkqqHx_iPiDjAeGiDhFiDiJiDfGiCmMjAnNjCoI_xHqqkZx_ -----
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			// _xZkqqHx_iDhFiDiJiDfGiCpAiOjNiClNiCmIiCkCjFjEjFgJiCmIiCoHiCmOiBeBiOjPiCmMiDiLiBfLiDhGiCnGiBeC_xHqqkZx_
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;

			// _xZkqqHx_iMlLiNnNiCmMiDhFiDiJiDfGjAeGiCpAiOoGjDlOiBeCjDgPjIfOiDhFiDiJiDfGiCmMiPoKiNiHiCmNjDkHjGlOiCpAiOhHjCoIiBeC_xHqqkZx_
			SColorID scidTmp = FD_S_COLOR_UNUSE;
			if (pObj->GetBrushRegister() == FD_BRUSH_REGISTER_UNUSE)
				scidTmp = pObj->GetBrushBackSColor();

			// _xZkqqHx_iDhFiDiJiDfGiCpAiOjNiCmCiNmFiPiJiCmMjFjEjFgJiCmIiCoHiCmOiBeBjAeGiCpAiLeMjIfOiBeC_xHqqkZx_
			if (scidSelBrush == FD_S_COLOR_UNSPECIFY)
			{
				scidSelBrush = scidTmp;
				continue;
			}
			// _xZkqqHx_jBePiMgJjAeGiCkKiInJiCmIiCoKiCmOiBeBiDiLiBfLiDhGiPeJjHlJiBeC_xHqqkZx_
			if (scidSelBrush != scidTmp)
			{
				scidSelBrush = FD_S_COLOR_UNSPECIFY;
				break;
			}
		}
		//----- _xZkqqHx_jDgPjIfOiDhJiDjDiCmMjAnNjCoI_xHqqkZx_ -----
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			// _xZkqqHx_iDhJiDjDiCpAiOjNiClNiCmIiCkCjFjEjFgJiCmIiCoHiCmOiBeBiOjPiCmMiDiLiBfLiDhGiCnGiBeC_xHqqkZx_
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;
			// _xZkqqHx_iDhJiDjDiCpAiOjNiCmCiNmFiPiJiCmMjFjEjFgJiCmIiCoHiCmOiBeBjDgPjIfOiDhJiDjD_xHqqkZx_ID_xZkqqHx_iCpAiLeMjIfOiBeC_xHqqkZx_
			if (pridSelRegPen == FD_PEN_REGISTER_UNSPECIFY)
			{
				pridSelRegPen = pObj->GetPenRegister();
				continue;
			}
			// _xZkqqHx_jDgPjIfOiDhJiDjD_xHqqkZx_ID_xZkqqHx_iCkKiInJiCmIiCoKiCmOiBeBiDiLiBfLiDhGiPeJjHlJiBeC_xHqqkZx_
			if (pridSelRegPen != pObj->GetPenRegister())
			{
				pridSelRegPen = FD_PEN_REGISTER_UNSPECIFY;
				break;
			}
		}
		//----- _xZkqqHx_jDgPjIfOiDhFiDiJiDfGiCmMjAnNjCoI_xHqqkZx_ -----
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			// _xZkqqHx_iDhFiDiJiDfGiCpAiOjNiClNiCmIiCkCjFjEjFgJiCmIiCoHiCmOiBeBiOjPiCmMiDiLiBfLiDhGiCnGiBeC_xHqqkZx_
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;
			// _xZkqqHx_iDhFiDiJiDfGiCpAiOjNiCmCiNmFiPiJiCmMjFjEjFgJiCmIiCoHiCmOiBeBjDgPjIfOiDhFiDiJiDfG_xHqqkZx_ID_xZkqqHx_iCpAiLeMjIfOiBeC_xHqqkZx_
			if (pridSelRegBrush == FD_BRUSH_REGISTER_UNSPECIFY)
			{
				pridSelRegBrush = pObj->GetBrushRegister();
				continue;
			}
			// _xZkqqHx_jDgPjIfOiDhFiDiJiDfG_xHqqkZx_ID_xZkqqHx_iCkKiInJiCmIiCoKiCmOiBeBiDiLiBfLiDhGiPeJjHlJiBeC_xHqqkZx_
			if (pridSelRegBrush != pObj->GetBrushRegister())
			{
				pridSelRegBrush = FD_BRUSH_REGISTER_UNSPECIFY;
				break;
			}
		}
	}
	m_cbbPenColor.SetCurSColor(scidSelPen);
//----- 05.07.04 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	m_cbbPenStyle.SetCurPenStyle(psidSelPenStyle);
	m_cbbPenWeight.SetCurPenWeight(mmfSelPenWeight);
//----- 05.07.04 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	m_cbbSolidBrush.SetCurSColor(scidSelBrush);
	m_cbbRegPen.SetCurPenRegister(pridSelRegPen);
	m_cbbRegBrush.SetCurBrushRegister(pridSelRegBrush);
} // CFCTolBrPenBrush::ObjSelectNotify.

//----- 05.07.02 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::UpdateItem
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhGiDiLiDfPiDeFiDjDiCmMjDoAjHgFiCpAiNfIjAfGiClHiCoJiBeCjAeGiCmMjFmPiNfIiBeFjFmAiCnHjBnGiCkGjDjJiCmFiOmAiNhDiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.03.08 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void CFCTolBrPenBrush::UpdateItem ()
//{
//	m_cbbPenColor.UpdateItem();
//	m_cbbSolidBrush.UpdateItem();
//	m_cbbRegPen.UpdateItem();
//	m_cbbRegBrush.UpdateItem();
//} // CFCTolBrPenBrush::UpdateItem.
//----- 05.07.02 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::GetCmbButtonInfo
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiDhLiDfOiDjDiCmMiPoOjFpBiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	lIndex	:_xZkqqHx_iPoOjFpBiCmMiDeDiDjDiDgGiDgCiDeOiDfIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiDhLiDfOiDjDiCmMiPoOjFpBiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iClBiCoKiImIiPoDiDhLiDfOiDjDiCmMiPoOjFpBiCkKjGlDiCkCiPoKiNiHiCmNiBeB_xHqqkZx_FCCmbButtonInfo::pCmb = NULL
 *			_xZkqqHx_iCmMiPoOjFpBiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.06.29 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
const CFCTolBrBase::FCCmbButtonInfo& CFCTolBrPenBrush::GetCmbButtonInfo (long lIndex)
{
	static FCCmbButtonInfo s_info[] =
	{
		{	&m_cbbPenColor,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIjFmPjAjEiBeC_xHqqkZx_
			ID_CMB_OBJ_PEN_COLOR,				// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
			CBS_DROPDOWNLIST|CBS_OWNERDRAWFIXED,// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjCmHiJmBiDfIiDfOiDeDiDiLiBeC_xHqqkZx_WS_VISIBLE|WS_VSCROLL|WS_TABSTOP _xZkqqHx_iCmNjFfHiPiAiBeC_xHqqkZx_
			s_nBoxWidth,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
// 05.08.10 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//			s_nDroppedWidth,					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			m_cbbPenColor.DROPWIDTH,			// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			s_nDroppedHeight },					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_

		{	&m_cbbPenStyle,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIjFmPjAjEiBeC_xHqqkZx_
			ID_CMB_OBJ_PEN_STYLE,				// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
			CBS_DROPDOWNLIST|CBS_OWNERDRAWFIXED,// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjCmHiJmBiDfIiDfOiDeDiDiLiBeC_xHqqkZx_WS_VISIBLE|WS_VSCROLL|WS_TABSTOP _xZkqqHx_iCmNjFfHiPiAiBeC_xHqqkZx_
			s_nBoxWidth2,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
// 05.08.10 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//			s_nDroppedWidth2,					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			m_cbbPenStyle.DROPWIDTH,			// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			s_nDroppedHeight2 },				// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_

		{	&m_cbbPenWeight,					// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIjFmPjAjEiBeC_xHqqkZx_
			ID_CMB_OBJ_PEN_WEIGHT,				// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
			CBS_DROPDOWN|CBS_OWNERDRAWFIXED|CBS_HASSTRINGS,	// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjCmHiJmBiDfIiDfOiDeDiDiLiBeC_xHqqkZx_WS_VISIBLE|WS_VSCROLL|WS_TABSTOP _xZkqqHx_iCmNjFfHiPiAiBeC_xHqqkZx_
			s_nBoxWidth2,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
// 05.08.10 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//			s_nDroppedWidth2,					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			m_cbbPenWeight.DROPWIDTH,			// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			s_nDroppedHeight2 },				// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_

		{	&m_cbbRegPen,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIjFmPjAjEiBeC_xHqqkZx_
			ID_CMB_OBJ_REG_PEN,					// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
			CBS_DROPDOWNLIST|CBS_OWNERDRAWFIXED,// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjCmHiJmBiDfIiDfOiDeDiDiLiBeC_xHqqkZx_WS_VISIBLE|WS_VSCROLL|WS_TABSTOP _xZkqqHx_iCmNjFfHiPiAiBeC_xHqqkZx_
			s_nBoxWidth2,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
// 05.08.10 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//			s_nDroppedWidth2,					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			m_cbbRegPen.DROPWIDTH,				// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			s_nDroppedHeight2 },				// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_

		{	&m_cbbSolidBrush,					// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIjFmPjAjEiBeC_xHqqkZx_
			ID_CMB_OBJ_BRUSH_COLOR,				// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
			CBS_DROPDOWNLIST|CBS_OWNERDRAWFIXED,// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjCmHiJmBiDfIiDfOiDeDiDiLiBeC_xHqqkZx_WS_VISIBLE|WS_VSCROLL|WS_TABSTOP _xZkqqHx_iCmNjFfHiPiAiBeC_xHqqkZx_
			s_nBoxWidth,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
// 05.08.10 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//			s_nDroppedWidth,					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			m_cbbSolidBrush.DROPWIDTH,			// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			s_nDroppedHeight },					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_

		{	&m_cbbRegBrush,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIjFmPjAjEiBeC_xHqqkZx_
			ID_CMB_OBJ_REG_BRUSH,				// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
			CBS_DROPDOWNLIST|CBS_OWNERDRAWFIXED,// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjCmHiJmBiDfIiDfOiDeDiDiLiBeC_xHqqkZx_WS_VISIBLE|WS_VSCROLL|WS_TABSTOP _xZkqqHx_iCmNjFfHiPiAiBeC_xHqqkZx_
			s_nBoxWidth2,						// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
// 05.08.10 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//			s_nDroppedWidth2,					// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			m_cbbRegBrush.DROPWIDTH,			// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			s_nDroppedHeight2 },				// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_

		{	NULL,								// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIjFmPjAjEiBeC_xHqqkZx_
			0,									// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmM_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
			0,									// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjCmHiJmBiDfIiDfOiDeDiDiLiBeC_xHqqkZx_WS_VISIBLE|WS_VSCROLL|WS_TABSTOP _xZkqqHx_iCmNjFfHiPiAiBeC_xHqqkZx_
			0,									// _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmMjFjNiBeC_xHqqkZx_
			0,									// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMjFjNiBeC_xHqqkZx_
			0 },								// _xZkqqHx_iDgIiDiNiDgCiDhGiDfPiDeFiDjDiCmMiNiCiClDiBeC_xHqqkZx_
	};
	return s_info[lIndex];
} // CFCTolBrPenBrush::GetCmbButtonInfo.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::OnCmdSessionEnded
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	CommandGate_xZkqqHx_iCmMiDfKiDgCiDfGiDiHiDjDiPeJjHlJiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrPenBrush::OnCmdSessionEnded ()
{
	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnCmdSessionEnded();
	ObjSelectNotify();
} // CFCTolBrPenBrush::OnCmdSessionEnded.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::OnObjSelectChanged
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiCmMjBeJjBpAiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrPenBrush::OnObjSelectChanged ()
{
	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnObjSelectChanged();
	ObjSelectNotify();
} // CFCTolBrPenBrush::OnObjSelectChanged.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::OnInitContents
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgIiDeMiDiFiDiBiDjDiDgHiCmM_xHqqkZx_DeleteContents_xZkqqHx_iBeB_xHqqkZx_InitContents_xZkqqHx_iCkJiCoHiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrPenBrush::OnInitContents ()
{
	// Baseclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnInitContents();
	m_cbbRegPen.UpdateItem();
	m_cbbRegBrush.UpdateItem();
} // CFCTolBrPenBrush::OnInitContents.

/////////////////////////////////////////////////////////////////////////////
// CFCTolBrPenBrush _xZkqqHx_iDiGiBfLiDfFiDeJiBfLiDgPiBfLiDiJiDeDiDgIiBeC_xHqqkZx_

//----- 05.06.29 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::CalcFixedLayout
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iMmFjCoIiDfEiDeDiDfJiCmMiMhGiOfKiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeCiOoFiCmJiDgIiDgCiDeOiClDiCoKiCoJiCmGiCkLiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.01.04 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//CSize CFCTolBrPenBrush::CalcFixedLayout (BOOL bStretch, BOOL bHorz)
//{
//	if (bHorz)
//	//----- _xZkqqHx_jAiFjFlNjFpLiMpMiCmMiDgIiDgCiDeOiOjO_xHqqkZx_ ------
//	{
//		// _xZkqqHx_jGhLjHiIiBeBiClBiCmMiPiIjHjNiCmNjFhDjHhGiCmIiCmMiClOiCkKiBeBiPgDjFpLiMpMiCmJjAeMiCmOiClFiClNiDhEiDiNiBfLiDgHiDgDiBfLiDiLiDgPiBfL_xHqqkZx_
//		// _xZkqqHx_iCpAiDgIiDgCiDeOiClFiCoGiCkEiCmGiClHiCoJiCmGiBeBjFjEjFgJiCkKiCkEiCnMiCkN_xHqqkZx_SEPARATOR_xZkqqHx_iImKjChFiCmJiInKjDkOiClFiCmIiCkCiClNiCnPiBeC_xHqqkZx_
//		FCWndAndId wid[] =
//		{
//			{ &m_cbbPenColor,  ID_CMB_OBJ_PEN_COLOR },
//			{ &m_cbbSolidBrush,ID_CMB_OBJ_BRUSH_COLOR },
//			{ &m_cbbRegPen,    ID_CMB_OBJ_REG_PEN },
//			{ &m_cbbRegBrush,  ID_CMB_OBJ_REG_BRUSH },
//		};
//		::FFHorznizeToolBar(this, wid, sizeof(wid) / sizeof(wid[0]));
//	}
//	return BASE_CLASS::CalcFixedLayout(bStretch, bHorz);
//} // CFCTolBrPenBrush::CalcFixedLayout.
//----- 05.06.29 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::OnUpdateCmdUI
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgDiBfLiDiL_xHqqkZx_ _xZkqqHx_iDgPiBfLiCnMiClNiCmNiDfIiDgFiBfLiDfOiDfI_xHqqkZx_ _xZkqqHx_iDgPiBfLiCmMiPpDjBnEiCpAiNfIjAfGiClHiCoJiClNiCnPiCmJiBeB_xHqqkZx_
 *			_xZkqqHx_iDhEiDiMiBfLiDiAiDiPiBfLiDeOiCkKiMmEiCnBiPgPiClFiCnMiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pTarget	:_xZkqqHx_iDeBiDhGiDiKiDfAiBfLiDfGiDiHiDjDiCmMiDiBiDeDiDjD_xHqqkZx_ _xZkqqHx_iDhEiDiMiBfLiDiAiCnGiCmMiDhMiDeDiDjDiDfOiBeC_xHqqkZx_
 *			bDisableIfNoHndler :_xZkqqHx_iNfIjAfGiDgOiDjDiDgIiDiJiCpAiOjNiCmBiCmEiCkCiCmIiCkCiDfCiDjDiDgHiDiNiBfLiDiLiCpA_xHqqkZx_
 *								_xZkqqHx_iOkJjDkOjDeJiCmJiLnGiOhOiPpDjBnEiCmFjFfMiOkGiClHiCoJiCkJiCmHiCkEiCkJiCpAiOkGiClHiDhEiDiJiDePiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.08.06 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrPenBrush::OnUpdateCmdUI (CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
{
	if (::IsWindow(m_hWnd))
	{
		BOOL bCanEdit = FFCanEditSelected();
		m_cbbPenColor.EnableWindow(bCanEdit);
		m_cbbPenStyle.EnableWindow(bCanEdit);
		m_cbbPenWeight.EnableWindow(bCanEdit);
		m_cbbSolidBrush.EnableWindow(bCanEdit);
		m_cbbRegPen.EnableWindow(bCanEdit);
		m_cbbRegBrush.EnableWindow(bCanEdit);
	}
	// Superclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::OnUpdateCmdUI(pTarget, bDisableIfNoHndler);
} // CFCTolBrPenBrush::OnUpdateCmdUI.

/////////////////////////////////////////////////////////////////////////////
// CFCTolBrPenBrush _xZkqqHx_iDiBiDgCiDfKiBfLiDfH_xHqqkZx_ _xZkqqHx_iDgOiDjDiDgIiDiJ_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::OnSelchangeCmbObjPenColor
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iPiDjAeGiDhJiDjDiDfCiDjDiDhLiDhLiDgCiDeOiDfIiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.03.01 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrPenBrush::OnSelchangeCmbObjPenColor ()
{
	// _xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJiCkJiCoHiBeBiDiBiDjDiDgPjFjEjFgJiCoAiKnMiCnPiCmEjBfDiCmEiCpAiPfHiCnPiCoJiBeC_xHqqkZx_
	ObjDynabaseSet stObj;
	myCollectObjects(stObj, g_pView->GetCurrentTool()->GetSelectLocalObjVector());

	SColorID scid = m_cbbPenColor.GetCurSColor();
	if (scid != FD_S_COLOR_UNSPECIFY && !stObj.empty())
	{
		// "_xZkqqHx_iPnKiNnH_xHqqkZx_"_xZkqqHx_iDfPiDeDiDeBiDiNiDePiPmBiLiOiCmMiMoDiCpAjBkGiOjOiNmEjFgAiJoGiClHiCoJiBeC_xHqqkZx_
		// _xZkqqHx_iMmFjHeMiDiKiBfLiDfHiDiHiDjDiNmEjFgAiJoGiCmGiCmMiPgEjFkBiCpAjEpAiCkPiCoJiClNiCnPiBeC_xHqqkZx_
		g_pView->UpdateWindow();
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiKeKiOgOiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionBegin();
		// _xZkqqHx_iDfCiDhNiDjDiDgIjHhAiDiMiDfCiBfLiDgIjFmPjAjEiBeC_xHqqkZx_
		FCPenRec rec;
		ObjDynabaseSet::const_iterator iObj;
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;
			if (pObj->GetPenRegister() != FD_PEN_REGISTER_UNUSE)
			//----- _xZkqqHx_jDgPjIfOiDhJiDjDiCkKjAnNjCoIiClDiCoKiCmEiCkCiCoJiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_PENREGISTER|FDFP_PENSTYLE|FDFP_PENWEIGHT|FDFP_PENBACKSCOLOR;
				rec.pridPenRegister = FD_PEN_REGISTER_UNUSE;
				rec.psidPenStyle = pObj->GetStdPenStyle();	// _xZkqqHx_jDgPjIfOiDhJiDjDiCmMiDfIiDfOiDeDiDiLiCpAjHkMjHhAiBeC_xHqqkZx_
				rec.mmfPenWeight = pObj->GetStdPenWeight();	// _xZkqqHx_jDgPjIfOiDhJiDjDiCmMjFjNiCpAjHkMjHhAiBeC_xHqqkZx_
				rec.scidPenBackSColor = scid;
			} else
			if (pObj->GetPenStyle() != FD_PEN_STYLE_UNUSE)
			//----- _xZkqqHx_jCmKiPoNiDhJiDjDiKiOiCmCiDhJiDjDiDfIiDfOiDeDiDiLiCkKjHeMiCoJiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_PENBACKSCOLOR;
				rec.scidPenBackSColor = scid;
			} else
			//----- _xZkqqHx_jCmKiPoNiDhJiDjDiKiOiCmCiDhJiDjDiDfIiDfOiDeDiDiLiCkKjGlDiCkCiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_PENSTYLE|FDFP_PENWEIGHT|FDFP_PENBACKSCOLOR;
				rec.psidPenStyle = FD_PEN_STYLE_SOLID;
				rec.mmfPenWeight = FD_PEN_WEIGHT_STANDARD;
				rec.scidPenBackSColor = scid;
			}
			// _xZkqqHx_iDhJiDjDjFmPiNfIiDfCiDhNiDjDiDgIjEkNiNhDiBeC_xHqqkZx_
			g_pDoc->CmdModifyPen(pObj, rec);
			// _xZkqqHx_iMmFjHeMiDiKiBfLiDfHiDiHiDjDiCmJjHmMiIoGiCpAjCmHiJmBiBeC_xHqqkZx_
			g_pView->AppendToLastRgn(pObj);
		}
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiPeJjHlJiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionEnd();
		// _xZkqqHx_iDiKiBfLiDfHiDiHiDjDiCpAiNmEjFgAiJoGiBeC_xHqqkZx_
		g_pView->SendRgnRedraw();
	}
} // CFCTolBrPenBrush::OnSelchangeCmbObjPenColor.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::OnSelchangeCmbObjPenStyle
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhJiDjDiDfIiDfOiDeDiDiLiDfCiDjDiDhLiDhLiDgCiDeOiDfIiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.04 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrPenBrush::OnSelchangeCmbObjPenStyle ()
{
	// _xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJiCkJiCoHiBeBiDiBiDjDiDgPjFjEjFgJiCoAiKnMiCnPiCmEjBfDiCmEiCpAiPfHiCnPiCoJiBeC_xHqqkZx_
	ObjDynabaseSet stObj;
	myCollectObjects(stObj, g_pView->GetCurrentTool()->GetSelectLocalObjVector());

	PenStyleID psid = m_cbbPenStyle.GetCurPenStyle();

	if (psid != FD_PEN_STYLE_UNSPECIFY && !stObj.empty())
	{
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiKeKiOgOiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionBegin();
		// _xZkqqHx_iDfCiDhNiDjDiDgIjHhAiDiMiDfCiBfLiDgIjFmPjAjEiBeC_xHqqkZx_
		FCPenRec rec;
		ObjDynabaseSet::const_iterator iObj;
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;
			if (pObj->GetPenRegister() != FD_PEN_REGISTER_UNUSE)
			//----- _xZkqqHx_jDgPjIfOiDhJiDjDiCkKjAnNjCoIiClDiCoKiCmEiCkCiCoJiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_PENREGISTER|FDFP_PENSTYLE|FDFP_PENWEIGHT|FDFP_PENBACKSCOLOR;
				rec.pridPenRegister = FD_PEN_REGISTER_UNUSE;
				rec.psidPenStyle = psid;
				rec.mmfPenWeight = pObj->GetStdPenWeight();				// _xZkqqHx_jDgPjIfOiDhJiDjDiCmMjFjNiCpAjHkMjHhAiBeC_xHqqkZx_
				rec.scidPenBackSColor = pObj->GetStdPenBackSColor();	// _xZkqqHx_jDgPjIfOiDhJiDjDiCmMjAeGiCpAjHkMjHhAiBeC_xHqqkZx_
			} else
			if (pObj->GetPenStyle() != FD_PEN_STYLE_UNUSE)
			//----- _xZkqqHx_jCmKiPoNiDhJiDjDiKiOiCmCiDhJiDjDiDfIiDfOiDeDiDiLiCkKjHeMiCoJiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_PENSTYLE;
				rec.psidPenStyle = psid;
			} else
			//----- _xZkqqHx_jCmKiPoNiDhJiDjDiKiOiCmCiDhJiDjDiDfIiDfOiDeDiDiLiCkKjGlDiCkCiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_PENSTYLE|FDFP_PENWEIGHT|FDFP_PENBACKSCOLOR;
				rec.psidPenStyle = psid;
				rec.mmfPenWeight = FD_PEN_WEIGHT_STANDARD;
				rec.scidPenBackSColor = FD_S_COLOR_BLACK;
			}
			// _xZkqqHx_iDhJiDjDjFmPiNfIiDfCiDhNiDjDiDgIjEkNiNhDiBeC_xHqqkZx_
			g_pDoc->CmdModifyPen(pObj, rec);
			// _xZkqqHx_iMmFjHeMiDiKiBfLiDfHiDiHiDjDiCmJjHmMiIoGiCpAjCmHiJmBiBeC_xHqqkZx_
			g_pView->AppendToLastRgn(pObj);
		}
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiPeJjHlJiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionEnd();
		// _xZkqqHx_iDiKiBfLiDfHiDiHiDjDiCpAiNmEjFgAiJoGiBeC_xHqqkZx_
		g_pView->SendRgnRedraw();
	}
} // CFCTolBrPenBrush::OnSelchangeCmbObjPenStyle.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::OnSelchangeCmbObjPenWeight
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhJiDjDiDfIiDfOiDeDiDiLiDfCiDjDiDhLiDhLiDgCiDeOiDfIiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.04 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrPenBrush::OnSelchangeCmbObjPenWeight ()
{
	// _xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJiCkJiCoHiBeBiDiBiDjDiDgPjFjEjFgJiCoAiKnMiCnPiCmEjBfDiCmEiCpAiPfHiCnPiCoJiBeC_xHqqkZx_
	ObjDynabaseSet stObj;
	myCollectObjects(stObj, g_pView->GetCurrentTool()->GetSelectLocalObjVector());

	fmmetol mmfPenWeight = m_cbbPenWeight.GetCurPenWeight();
	if (mmfPenWeight < 0.0 || FD_PENWEIGHT_MAX < mmfPenWeight)
		return;

	if (!stObj.empty())
	{
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiKeKiOgOiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionBegin();
		// _xZkqqHx_iDfCiDhNiDjDiDgIjHhAiDiMiDfCiBfLiDgIjFmPjAjEiBeC_xHqqkZx_
		FCPenRec rec;
		ObjDynabaseSet::const_iterator iObj;
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;
			if (pObj->GetPenRegister() != FD_PEN_REGISTER_UNUSE)
			//----- _xZkqqHx_jDgPjIfOiDhJiDjDiCkKjAnNjCoIiClDiCoKiCmEiCkCiCoJiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_PENREGISTER|FDFP_PENSTYLE|FDFP_PENWEIGHT|FDFP_PENBACKSCOLOR;
				rec.pridPenRegister = FD_PEN_REGISTER_UNUSE;
				rec.psidPenStyle = pObj->GetStdPenStyle();				// _xZkqqHx_jDgPjIfOiDhJiDjDiCmMiDfIiDfOiDeDiDiLiCpAjHkMjHhAiBeC_xHqqkZx_
				rec.mmfPenWeight = mmfPenWeight;
				rec.scidPenBackSColor = pObj->GetStdPenBackSColor();	// _xZkqqHx_jDgPjIfOiDhJiDjDiCmMjAeGiCpAjHkMjHhAiBeC_xHqqkZx_
			} else
			if (pObj->GetPenStyle() != FD_PEN_STYLE_UNUSE)
			//----- _xZkqqHx_jCmKiPoNiDhJiDjDiKiOiCmCiDhJiDjDiDfIiDfOiDeDiDiLiCkKjHeMiCoJiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_PENWEIGHT;
				rec.mmfPenWeight = mmfPenWeight;
			} else
			//----- _xZkqqHx_jCmKiPoNiDhJiDjDiKiOiCmCiDhJiDjDiDfIiDfOiDeDiDiLiCkKjGlDiCkCiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_PENSTYLE|FDFP_PENWEIGHT|FDFP_PENBACKSCOLOR;
				rec.psidPenStyle = FD_PEN_STYLE_SOLID;
				rec.mmfPenWeight = mmfPenWeight;
				rec.scidPenBackSColor = FD_S_COLOR_BLACK;
			}
//----- 06.03.13 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
			// _xZkqqHx_jFmPiNfIjBePiCmMjFjEjFgJiCpAiMmFjHeMiDiKiBfLiDfHiDiHiDjDiCmJjHmMiIoGiCpAjCmHiJmBiBeC_xHqqkZx_
			// _xZkqqHx_iDhJiDjDjFjNiCpAiNnHiCkNiClHiCoJiPoKiNiHiBeBjFmPiNfIjBePiCmMiDiKiBfLiDfHiDiHiDjDiCkKjFeLjHhGiBeC_xHqqkZx_
			g_pView->AppendToLastRgn(pObj);
//----- 06.03.13 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
			// _xZkqqHx_iDhJiDjDjFmPiNfIiDfCiDhNiDjDiDgIjEkNiNhDiBeC_xHqqkZx_
			g_pDoc->CmdModifyPen(pObj, rec);
			// _xZkqqHx_jFmPiNfIiMoDiCmMjFjEjFgJiCpAiMmFjHeMiDiKiBfLiDfHiDiHiDjDiCmJjHmMiIoGiCpAjCmHiJmBiBeC_xHqqkZx_
			g_pView->AppendToLastRgn(pObj);
		}
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiPeJjHlJiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionEnd();
		// _xZkqqHx_iDiKiBfLiDfHiDiHiDjDiCpAiNmEjFgAiJoGiBeC_xHqqkZx_
		g_pView->SendRgnRedraw();
	}
} // CFCTolBrPenBrush::OnSelchangeCmbObjPenWeight.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::OnSelchangeCmbObjRegPen
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jDgPjIfOiDhJiDjDiDfCiDjDiDhLiDhLiDgCiDeOiDfIiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.03.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrPenBrush::OnSelchangeCmbObjRegPen ()
{
	// _xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJiCkJiCoHiBeBiDiBiDjDiDgPjFjEjFgJiCoAiKnMiCnPiCmEjBfDiCmEiCpAiPfHiCnPiCoJiBeC_xHqqkZx_
	ObjDynabaseSet stObj;
	myCollectObjects(stObj, g_pView->GetCurrentTool()->GetSelectLocalObjVector());

	PenRegisterID prid = m_cbbRegPen.GetCurPenRegister();
	if (prid != FD_PEN_REGISTER_UNSPECIFY && !stObj.empty())
	{
		// "_xZkqqHx_iPnKiNnH_xHqqkZx_"_xZkqqHx_iDfPiDeDiDeBiDiNiDePiPmBiLiOiCmMiMoDiCpAjBkGiOjOiNmEjFgAiJoGiClHiCoJiBeC_xHqqkZx_
		// _xZkqqHx_iMmFjHeMiDiKiBfLiDfHiDiHiDjDiNmEjFgAiJoGiCmGiCmMiPgEjFkBiCpAjEpAiCkPiCoJiClNiCnPiBeC_xHqqkZx_
		g_pView->UpdateWindow();
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiKeKiOgOiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionBegin();
		// _xZkqqHx_iDfCiDhNiDjDiDgIjHhAiDiMiDfCiBfLiDgIjFmPjAjEiBeC_xHqqkZx_
		FCPenRec rec;
		ObjDynabaseSet::const_iterator iObj;
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;
			// _xZkqqHx_jFmPiNfIjGlDiCkCiPoKiNiHiCmNiDhAiDfIiBeC_xHqqkZx_
			if (pObj->GetPenRegister() == prid) continue;
			if ((pObj->GetPenRegister() == FD_PEN_REGISTER_UNUSE &&
				 prid != FD_PEN_REGISTER_UNUSE) ||
				(pObj->GetPenRegister() != FD_PEN_REGISTER_UNUSE &&
				 prid == FD_PEN_REGISTER_UNUSE))
			//----- _xZkqqHx_jCmKiPoNiDhJiDjD_xHqqkZx_ -> _xZkqqHx_jDgPjIfOiDhJiDjDiBeBjDgPjIfOiDhJiDjD_xHqqkZx_ -> _xZkqqHx_jCmKiPoNiDhJiDjDiCmJjFmPiNfIiCmMiPoKiNiH_xHqqkZx_ -----
			{
				// _xZkqqHx_jDgPjIfOiDhJiDjDiCpAjAnNjCoIiClFiBeBjCmKiPoNiDhJiDjDiCpAjDkHjGlOiCmJiClHiCoJiBeC_xHqqkZx_
				rec.wMask = FDFP_PENREGISTER|FDFP_PENSTYLE|FDFP_PENWEIGHT|FDFP_PENBACKSCOLOR;
				rec.pridPenRegister = prid;
				rec.psidPenStyle = FD_PEN_STYLE_UNUSE;
				rec.mmfPenWeight = FD_PEN_WEIGHT_UNUSE;
				rec.scidPenBackSColor = FD_S_COLOR_UNUSE;
			} else
			//----- _xZkqqHx_jDgPjIfOiDhJiDjD_xHqqkZx_ -> _xZkqqHx_jDgPjIfOiDhJiDjDiCmMiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_PENREGISTER;
				rec.pridPenRegister = prid;
			}
			// _xZkqqHx_iDhJiDjDjFmPiNfIiDfCiDhNiDjDiDgIjEkNiNhDiBeC_xHqqkZx_
			g_pDoc->CmdModifyPen(pObj, rec);
			// _xZkqqHx_iMmFjHeMiDiKiBfLiDfHiDiHiDjDiCmJjHmMiIoGiCpAjCmHiJmBiBeC_xHqqkZx_
			g_pView->AppendToLastRgn(pObj);
		}
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiPeJjHlJiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionEnd();
		// _xZkqqHx_iDiKiBfLiDfHiDiHiDjDiCpAiNmEjFgAiJoGiBeC_xHqqkZx_
		g_pView->SendRgnRedraw();
	}
} // CFCTolBrPenBrush::OnSelchangeCmbObjRegPen.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::OnSelchangeCmbObjBrushColor
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iPiDjAeGiDhFiDiJiDfGiDfCiDjDiDhLiDhLiDgCiDeOiDfIiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.03.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrPenBrush::OnSelchangeCmbObjBrushColor ()
{
	// _xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJiCkJiCoHiBeBiDiBiDjDiDgPjFjEjFgJiCoAiKnMiCnPiCmEjBfDiCmEiCpAiPfHiCnPiCoJiBeC_xHqqkZx_
	ObjDynabaseSet stObj;
	myCollectObjects(stObj, g_pView->GetCurrentTool()->GetSelectLocalObjVector());

	SColorID scid = m_cbbSolidBrush.GetCurSColor();
	if (scid != FD_S_COLOR_UNSPECIFY && !stObj.empty())
	{
		// "_xZkqqHx_iPnKiNnH_xHqqkZx_"_xZkqqHx_iDfPiDeDiDeBiDiNiDePiPmBiLiOiCmMiMoDiCpAjBkGiOjOiNmEjFgAiJoGiClHiCoJiBeC_xHqqkZx_
		// _xZkqqHx_iMmFjHeMiDiKiBfLiDfHiDiHiDjDiNmEjFgAiJoGiCmGiCmMiPgEjFkBiCpAjEpAiCkPiCoJiClNiCnPiBeC_xHqqkZx_
		g_pView->UpdateWindow();
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiKeKiOgOiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionBegin();
		// _xZkqqHx_iDfCiDhNiDjDiDgIjHhAiDiMiDfCiBfLiDgIjFmPjAjEiBeC_xHqqkZx_
		FCBrushRec rec;
		ObjDynabaseSet::const_iterator iObj;
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;
			if (pObj->GetBrushRegister() == FD_BRUSH_REGISTER_UNUSE &&
				pObj->GetBrushPattern() == FD_PATTERN_UNUSE)
			//----- _xZkqqHx_jCmKiPoNiDhFiDiJiDfGiKiOiCmCiDhAiDfOiBfLiDjDiCkKjGlDiCkCiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_BRUSHBACKSCOLOR;
				rec.scidBrushBackSColor = scid;
			} else
			//----- _xZkqqHx_jDgPjIfOiDhFiDiJiDfGiIlNiCkCiCmNiDhAiDfOiBfLiDjDiCkKjHeMiCoJiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_BRUSHREGISTER|FDFP_BRUSHFORESCOLOR|
							FDFP_BRUSHPATTERN|FDFP_BRUSHBACKSCOLOR;
				rec.bridBrushRegister = FD_BRUSH_REGISTER_UNUSE;
				rec.scidBrushForeSColor = FD_S_COLOR_UNUSE;
				rec.ptidBrushPattern = FD_PATTERN_UNUSE;
				rec.scidBrushBackSColor = scid;
			}
			// _xZkqqHx_iDhFiDiJiDfGjFmPiNfIiDfCiDhNiDjDiDgIjEkNiNhDiBeC_xHqqkZx_
			g_pDoc->CmdModifyBrush(pObj, rec);
			// _xZkqqHx_iMmFjHeMiDiKiBfLiDfHiDiHiDjDiCmJjHmMiIoGiCpAjCmHiJmBiBeC_xHqqkZx_
			g_pView->AppendToLastRgn(pObj);
		}
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiPeJjHlJiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionEnd();
		// _xZkqqHx_iDiKiBfLiDfHiDiHiDjDiCpAiNmEjFgAiJoGiBeC_xHqqkZx_
		g_pView->SendRgnRedraw();
	}
} // CFCTolBrPenBrush::OnSelchangeCmbObjBrushColor.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::OnSelchangeCmbObjRegBrush
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jDgPjIfOiDhFiDiJiDfGiDfCiDjDiDhLiDhLiDgCiDeOiDfIiCkKjFmPiNfIiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.03.02 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void CFCTolBrPenBrush::OnSelchangeCmbObjRegBrush ()
{
	// _xZkqqHx_jBeJjBpAjCiGiCmMjFjEjFgJiCkJiCoHiBeBiDiBiDjDiDgPjFjEjFgJiCoAiKnMiCnPiCmEjBfDiCmEiCpAiPfHiCnPiCoJiBeC_xHqqkZx_
	ObjDynabaseSet stObj;
	myCollectObjects(stObj, g_pView->GetCurrentTool()->GetSelectLocalObjVector());

	BrushRegisterID brid = m_cbbRegBrush.GetCurBrushRegister();
	if (brid != FD_BRUSH_REGISTER_UNSPECIFY && !stObj.empty())
	{
		// "_xZkqqHx_iPnKiNnH_xHqqkZx_"_xZkqqHx_iDfPiDeDiDeBiDiNiDePiPmBiLiOiCmMiMoDiCpAjBkGiOjOiNmEjFgAiJoGiClHiCoJiBeC_xHqqkZx_
		// _xZkqqHx_iMmFjHeMiDiKiBfLiDfHiDiHiDjDiNmEjFgAiJoGiCmGiCmMiPgEjFkBiCpAjEpAiCkPiCoJiClNiCnPiBeC_xHqqkZx_
		g_pView->UpdateWindow();
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiKeKiOgOiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionBegin();
		// _xZkqqHx_iDfCiDhNiDjDiDgIjHhAiDiMiDfCiBfLiDgIjFmPjAjEiBeC_xHqqkZx_
		FCBrushRec rec;
		ObjDynabaseSet::const_iterator iObj;
		for (iObj = stObj.begin(); iObj != stObj.end(); iObj++)
		{
			if (!(*iObj)->IsKindOf(FDOJ_FIGURE)) continue;
			FCObjFigure* pObj = (FCObjFigure*)*iObj;
			// _xZkqqHx_jFmPiNfIjGlDiCkCiPoKiNiHiCmNiDhAiDfIiBeC_xHqqkZx_
			if (pObj->GetBrushRegister() == brid) continue;
			if ((pObj->GetBrushRegister() == FD_BRUSH_REGISTER_UNUSE &&
				 brid != FD_BRUSH_REGISTER_UNUSE) ||
				(pObj->GetBrushRegister() != FD_BRUSH_REGISTER_UNUSE &&
				 brid == FD_BRUSH_REGISTER_UNUSE))
			//----- _xZkqqHx_jCmKiPoNiDhFiDiJiDfG_xHqqkZx_ -> _xZkqqHx_jDgPjIfOiDhFiDiJiDfGiBeBjDgPjIfOiDhFiDiJiDfG_xHqqkZx_ -> _xZkqqHx_jCmKiPoNiDhFiDiJiDfGiCmJjFmPiNfIiCmMiPoKiNiH_xHqqkZx_ -----
			{
				// _xZkqqHx_jDgPjIfOiDhFiDiJiDfGiCpAjAnNjCoIiClFiBeBjCmKiPoNiDhFiDiJiDfGiCpAjDkHjGlOiCmJiClHiCoJiBeC_xHqqkZx_
				rec.wMask = FDFP_BRUSHREGISTER|FDFP_BRUSHBACKSCOLOR|
							FDFP_BRUSHPATTERN|FDFP_BRUSHFORESCOLOR;
				rec.bridBrushRegister = brid;
				rec.scidBrushBackSColor = FD_S_COLOR_UNUSE;
				rec.ptidBrushPattern = FD_PATTERN_UNUSE;
				rec.scidBrushForeSColor = FD_S_COLOR_UNUSE;
			} else
			//----- _xZkqqHx_jDgPjIfOiDhFiDiJiDfG_xHqqkZx_ -> _xZkqqHx_jDgPjIfOiDhFiDiJiDfGiCmMiPoKiNiH_xHqqkZx_ -----
			{
				rec.wMask = FDFP_BRUSHREGISTER;
				rec.bridBrushRegister = brid;
			}
			// _xZkqqHx_iDhFiDiJiDfGjFmPiNfIiDfCiDhNiDjDiDgIjEkNiNhDiBeC_xHqqkZx_
			g_pDoc->CmdModifyBrush(pObj, rec);
			// _xZkqqHx_iMmFjHeMiDiKiBfLiDfHiDiHiDjDiCmJjHmMiIoGiCpAjCmHiJmBiBeC_xHqqkZx_
			g_pView->AppendToLastRgn(pObj);
		}
		// _xZkqqHx_iDfKiDgCiDfGiDiHiDjDiPeJjHlJiPiIjHjNiBeC_xHqqkZx_
		g_pDoc->SessionEnd();
		// _xZkqqHx_iDiKiBfLiDfHiDiHiDjDiCpAiNmEjFgAiJoGiBeC_xHqqkZx_
		g_pView->SendRgnRedraw();
	}
} // CFCTolBrPenBrush::OnSelchangeCmbObjRegBrush.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	CFCTolBrPenBrush::OnUserCmbBoxOnKey
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	CFCCmbBoxOnKey _xZkqqHx_iCmJjDgPjIfOiClDiCoKiClNiDeMiBfLiCkKjDpMjHmNiClDiCoKiClNiPoKiNiHiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	wParam	:CFCCmbBoxOnKey_xZkqqHx_iCmMiDfCiDjDiDgHiDiNiBfLiDiL_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			lParam	:_xZkqqHx_jDpMjHmNiClDiCoKiClNiDeMiBfLiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iPoNiCmJ_xHqqkZx_1_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.04 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
LRESULT CFCTolBrPenBrush::OnUserCmbBoxOnKey (WPARAM wParam, LPARAM lParam)
{
	ASSERT(wParam == ID_CMB_OBJ_PEN_WEIGHT);
	if (lParam == VK_RETURN)
	//----- _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmJ_xHqqkZx_EMTER_xZkqqHx_iDeMiBfLiCkKjDpMjHmNiClDiCoKiClNiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_iDhJiDjDjFjNjFmPiNfIiCpAiPiIjHjNiBeC_xHqqkZx_
		OnSelchangeCmbObjPenWeight();
		FFGetMainWnd()->GetWnd()->SetFocus();
	} else
	if (lParam == VK_ESCAPE)
	//----- _xZkqqHx_iDfCiDjDiDhLiDhLiDgCiDeOiDfIiCmJ_xHqqkZx_ESC_xZkqqHx_iDeMiBfLiCkKjDpMjHmNiClDiCoKiClNiPoKiNiH_xHqqkZx_ -----
	{
		FFGetMainWnd()->GetWnd()->SetFocus();
	}
	return 1;
} // CFCTolBrPenBrush::OnUserCmbBoxOnKey.
