#include "stdafx.h"
#include "DynamicDraw.h"		// For ID_TOOL_ANY_EDIT.
#include "RegData.h"			// For FCRegData.
#include "ToolManager.h"		// For g_pToolManager.
#include "DynamicDrawView.h"	// For g_pView.
#include "FoundDoc.h"			// For g_pDoc.
#include "UtilCoord.h"			// For mm2lg.etc.
#include "UtilDlg.h"			// For FFPopupSubmenu.
#include "UtilGraph.h"			// For FCAutoDC.
#include "UtilMisc.h"			// For FFSetCapture.etc.
#include "UtilStr.h"			// For FFFormatString.
#include "UtilObj.h"			// For FFObjTypeToStr.
#include "UtilWin.h"			// For FFPostSendMessage.
#include "ObjDynabase.h"		// For FCObjDynabase.
#include "LinkManager.h"		// For FCLinkManager.
#include "FrameWnd.h"			// For FFGetMainWnd().
#include "ToolBaseFDA.h"		// This header.

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


HICON	FCToolBaseFDA::m_hIconScrollMark = NULL;		// _xZkqqHx_iDeBiDeDiDfCiDjDiBeC_xHqqkZx_

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::FCToolBaseFDA
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDjDiDfIiDgHiDiJiDeOiDfOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.30 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
FCToolBaseFDA::FCToolBaseFDA ()
{
	// _xZkqqHx_iDfCiDjDiDgHiDiNiBfLiDiLiDeMiBfLiCmMiJjPiClFiClNiPpDjBnEiCpAjElNjDfNiClHiCoJiCkJiBeI_xHqqkZx_
	m_bControlInvert = FALSE;
	// _xZkqqHx_iDfGiDhEiDgHiDeMiBfLiCmMiJjPiClFiClNiPpDjBnEiCpAjElNjDfNiClHiCoJiCkJiBeI_xHqqkZx_
	m_bShiftInvert = FALSE;
	// _xZkqqHx_iDhMiDgCiDhGiDeBiDgCiDhGiDiKiDjDiDeOiDiBiDgKiDiFiBfLiCmMjHeEjAoGiDfCiDhNiDjDiDgIiBeC_xHqqkZx_
	m_dwTopCommand = DWORD(-1);
} // FCToolBaseFDA::FCToolBaseFDA.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnLButtonDown
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDeFiDfIiDhLiDfOiDjDiCpAiJjPiClFiClNiCmGiCkLiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			mmptMsc	:_xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_iDeMiBfLiCpAjClCiCnHiCoJiDhEiDiJiDePiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnLButtonDown (CDC* pDC, const DBLPoint& mmptMsc, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnMsEvent(WM_LBUTTONDOWN, pDC ,mmptMsc, nFlags);
} // FCToolBaseFDA::OnLButtonDown.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnMouseMove
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDeFiDfIiInKjDkOiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			mmptMsc	:_xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_iDeMiBfLiCpAjClCiCnHiCoJiDhEiDiJiDePiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnMouseMove (CDC* pDC, const DBLPoint& mmptMsc, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnMsEvent(WM_MOUSEMOVE, pDC ,mmptMsc, nFlags);
} // FCToolBaseFDA::OnMouseMove.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnLButtonUp
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDeFiDfIiNlGiDhLiDfOiDjDiCkKjHkDiClDiCoKiClNiOjOiOmAiNhDiClDiCoKiCoJ_xHqqkZx_.
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			mmptMsc	:_xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_iDeMiBfLiCpAjClCiCnHiCoJiDhEiDiJiDePiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnLButtonUp (CDC* pDC, const DBLPoint& mmptMsc, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnMsEvent(WM_LBUTTONUP, pDC ,mmptMsc, nFlags);
} // FCToolBaseFDA::OnLButtonUp.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnLButtonDblClk
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDeFiDfIiNlGiDhLiDfOiDjDiCmMiDfPiDhFiDiLiDeOiDiKiDgCiDeOiCmFiLeOjDkOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			mmptMsc	:_xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_iDeMiBfLiCpAjClCiCnHiCoJiDhEiDiJiDePiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnLButtonDblClk (CDC* pDC, const DBLPoint& mmptMsc, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnMsEvent(WM_LBUTTONDBLCLK, pDC ,mmptMsc, nFlags);
} // FCToolBaseFDA::OnLButtonDblClk.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnRButtonDown
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDeFiDfIiJeFiDhLiDfOiDjDiCkKiJjPiClDiCoKiClNiOjOiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			mmptMsc	:_xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_iDeMiBfLiCpAjClCiCnHiCoJiDhEiDiJiDePiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnRButtonDown (CDC* pDC, const DBLPoint& mmptMsc, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnMsEvent(WM_RBUTTONDOWN, pDC ,mmptMsc, nFlags);
} // FCToolBaseFDA::OnRButtonDown.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnRButtonUp
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDeFiDfIiJeFiDhLiDfOiDjDiCkKjHkDiClDiCoKiClNiOjOiOmAiNhDiClDiCoKiCoJ_xHqqkZx_.
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			mmptMsc	:_xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_iDeMiBfLiCpAjClCiCnHiCoJiDhEiDiJiDePiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnRButtonUp (CDC* pDC, const DBLPoint& mmptMsc, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnMsEvent(WM_RBUTTONUP, pDC ,mmptMsc, nFlags);
} // FCToolBaseFDA::OnRButtonUp.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnRButtonDblClk
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDeFiDfIiJeFiDhLiDfOiDjDiCmMiDfPiDhFiDiLiDeOiDiKiDgCiDeOiCmFiLeOjDkOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			mmptMsc	:_xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_iDeMiBfLiCpAjClCiCnHiCoJiDhEiDiJiDePiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnRButtonDblClk (CDC* pDC, const DBLPoint& mmptMsc, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnMsEvent(WM_RBUTTONDBLCLK, pDC ,mmptMsc, nFlags);
} // FCToolBaseFDA::OnRButtonDblClk.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnMButtonDown
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDeFiDfIjCiGiDhLiDfOiDjDiCkKiJjPiClDiCoKiClNiOjOiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			mmptMsc	:_xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_iDeMiBfLiCpAjClCiCnHiCoJiDhEiDiJiDePiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.11.09 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnMButtonDown (CDC* pDC, const DBLPoint& mmptMsc, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnMsEvent(WM_MBUTTONDOWN, pDC ,mmptMsc, nFlags);
} // FCToolBaseFDA::OnMButtonDown.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnMButtonUp
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDeFiDfIjCiGiDhLiDfOiDjDiCkKjHkDiClDiCoKiClNiOjOiOmAiNhDiClDiCoKiCoJ_xHqqkZx_.
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			mmptMsc	:_xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_iDeMiBfLiCpAjClCiCnHiCoJiDhEiDiJiDePiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.11.09 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnMButtonUp (CDC* pDC, const DBLPoint& mmptMsc, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnMsEvent(WM_MBUTTONUP, pDC ,mmptMsc, nFlags);
} // FCToolBaseFDA::OnMButtonUp.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnWindowMessage
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgDiBfLiDiLiCmJjHeMiMpIiCmIiBeBiDeFiDeCiDjDiDgIiDeFiDiBiDgCiDfKiBfLiDfHiCkJiCoHiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC			:_xZkqqHx_jFgAiJoGjHhA_xHqqkZx_DC_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwMessage	:_xZkqqHx_iDeFiDeCiDjDiDgIiDeFiDiBiDgCiDfKiBfLiDfHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			wParam		:_xZkqqHx_iDiBiDgCiDfKiBfLiDfHiDhAiDiJiDiBiBfLiDfOiCpAiOhHjCoIiBeC_xHqqkZx_
 *			lParam		:_xZkqqHx_iDiBiDgCiDfKiBfLiDfHiDhAiDiJiDiBiBfLiDfOiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.11.09 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnWindowMessage (CDC* pDC, DWORD dwMessage,
									WPARAM wParam, LPARAM lParam)
{
//----- 06.12.26 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_iDgDiBfLiDiLjFmPiNfIjCiGiCkJiCmCiDeBiDeDiDgIiDiLiPpDjBnEiCmFiCkAiCoJiPoKiNiHiCmNiBeBiJlNiCoAiOpDiCkPjFhEiCkPiCmIiCkCiBeC_xHqqkZx_
	if (IsToolSwitching() && GetCurrentState() == STATE_IDLE)
		return;
//----- 06.12.26 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	// _xZkqqHx_iDiBiDgCiDfKiBfLiDfHiDhAiDiJiDiBiBfLiDfOiCpAiOhHjCoIiBeC_xHqqkZx_
	m_dwWParam	= wParam;
	m_dwLParam	= lParam;
	int iEvent = dwMessage;
	for (;;)
	{
		// _xZkqqHx_iPpDjBnEiCmMjBeKiInKiCpAiMjPiNpFiBeC_xHqqkZx_
		int iNewState = TransFDA(m_iCurState, iEvent);
		// _xZkqqHx_jBeKiInKiClFiCmIiCkCiPoKiNiHiCmNiPeJjHlJiBeC_xHqqkZx_
		if (iNewState == STATE_NONE) break;
		// _xZkqqHx_jBeKiInKiMoDiCmMiPpDjBnEiCpAjAnNjCoIiBeC_xHqqkZx_
		m_iCurState = iNewState;
		// _xZkqqHx_iPpDjBnEiCmJiJjOiClGiClNiPiIjHjNiBeC_xHqqkZx_
		StateFDA(m_iCurState, pDC);
		// _xZkqqHx_iDeDiDhIiDjDiDgHiCmJjGlDiClFiCpAjAnNjCoIiBeC_xHqqkZx_
		iEvent = WM_NULL;
	}
} // FCToolBaseFDA::OnWindowMessage.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnKeyDown
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDeMiBfLiCkKiJjPiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nChar	:_xZkqqHx_iJjPiClDiCoKiClNiDeMiBfLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nRepCnt	:_xZkqqHx_iDeMiBfLiCmMiDiKiDhDiBfLiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_jDkPiOjOiCmJiJjPiClDiCoKiClNiDeMiBfLiCmMiPpDjBnEiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnKeyDown (CDC* pDC, UINT nChar, UINT nRepCnt, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnKyEvent(WM_KEYDOWN, pDC, nChar, nRepCnt, nFlags);
} // FCToolBaseFDA::OnKeyDown.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnKeyUp
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDeMiBfLiCkKjHkDiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nChar	:_xZkqqHx_iJjPiClDiCoKiClNiDeMiBfLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nRepCnt	:_xZkqqHx_iDeMiBfLiCmMiDiKiDhDiBfLiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_jDkPiOjOiCmJiJjPiClDiCoKiClNiDeMiBfLiCmMiPpDjBnEiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnKeyUp (CDC* pDC, UINT nChar, UINT nRepCnt, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnKyEvent(WM_KEYUP, pDC, nChar, nRepCnt, nFlags);
} // FCToolBaseFDA::OnKeyUp.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnChar
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDeMiBfLiCkKiDeOiDiKiDgCiDeOiClDiCoKiClNiOjOiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nChar	:_xZkqqHx_iJjPiClDiCoKiClNiDeMiBfLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nRepCnt	:_xZkqqHx_iDeMiBfLiCmMiDiKiDhDiBfLiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_jDkPiOjOiCmJiJjPiClDiCoKiClNiDeMiBfLiCmMiPpDjBnEiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnChar (CDC* pDC, UINT nChar, UINT nRepCnt, UINT nFlags)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnKyEvent(WM_CHAR, pDC, nChar, nRepCnt, nFlags);
} // FCToolBaseFDA::OnChar.

//----- 01.11.11 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnTimer
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jAnNjCoIiClDiCoKiClNiDfOiDeDiDhNiBfLiCmJiCoGiCmBiCmEiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.03.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolBaseFDA::OnTimer (CDC* pDC)
//{
//	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
//	OnTmEvent(pDC);
//} // FCToolBaseFDA::OnTimer.
//----- 01.11.11 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnAnyToolCommand
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgDiBfLiDiLjDoAjFjEiDfCiDhNiDjDiDgIiCmMiCkCiClIiCoKiCkJiCkJiCoHiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwCommand	:_xZkqqHx_iDfCiDhNiDjDiDgI_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnAnyToolCommand (CDC* pDC, UINT dwCommand)
{
	OnCmEvent(pDC, dwCommand);
} // FCToolBaseFDA::OnAnyToolCommand.

//----- 05.07.28 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnPursuerTextNeedInfo
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhMiDgCiDhGiDhBiDjDiDgHiCkKiBeBiDhBiDjDiDgHiPoOjFpBiCmMjAnNjCoIiCpAjHhGiLiBiClHiCoJiNnLiCmJiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jCiNiInD_xHqqkZx_>	_xZkqqHx_jFeLiClIiBeB_xHqqkZx_GetCursorPos_xZkqqHx_iKnGjAjEiCmFiDhNiDeFiDfIiImKjChFiCpAiOoGjDlOiClHiCoJiClBiCmGiBeC_xHqqkZx_
// *			_xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCkK_xHqqkZx_WM_MOUSEMOVE_xZkqqHx_iCmJjHiKiCmBiCmEiCkCiCoJiCmGiBeBiDiBiDgKiDiFiBfLjFfMiOkGiOjOiCmIiCmHiCmJ_xHqqkZx_
// *			_xZkqqHx_iDhNiDeFiDfIiImKjChFiCkKiMlLiNnNiCmMiImKjChFiCmGjAeIiCkCiIoBiCmBiCmEiCkCiCoJiPoKiNiHiCkKiCkAiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.06 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolBaseFDA::OnPursuerTextNeedInfo ()
//{
//	// _xZkqqHx_iDhNiDeFiDfIiDeKiBfLiDfMiDiLiCmMiMlLiNnNiCmMiImKjChFiCpAiBeBiDfIiDeOiDiKiBfLiDjDiNmAjFfHiCmFiOoGjDlOiBeC_xHqqkZx_
//	CPoint lgptMsc;
//	(void)::GetCursorPos(&lgptMsc);
//	// _xZkqqHx_iDhNiDeFiDfIiDeKiBfLiDfMiDiLiImKjChFiCpAiOmAiNmAjFfHiCmJjFmPiKlHiClHiCoJiBeC_xHqqkZx_
//	g_pView->ScreenToClient(&lgptMsc);
//	g_pView->DPtoLP(lgptMsc);
//	// _xZkqqHx_iMlLiNnNiCmMiDiMiDeDiDiEiBfLiCkJiCoHiJlKiCmMiChJiDeJiBfLiDfPiBfLiCpAiOoGjDlOiBeC_xHqqkZx_
//	FCObjDynabase* pObj = g_pDoc->GetIntersectObject(lg2mm(lgptMsc), NULL, FDOZ_ON_ANY);
//	if (pObj != NULL)
//	{
//		WString wstrHint;
//		GetObjectHintText(wstrHint, pObj);
//
//		wstrHint += L"_xZkqqHx_iCkAiCkCiCkEiCkGiCkI_xHqqkZx_<a c:\\abc\\efg.h>_xZkqqHx_iCnMiCnNiCnOiCnPiCoA_xHqqkZx_</a>_xZkqqHx_iCkJiCkLiCkNiBeC_xHqqkZx_<c>"
//L"\r\n"
//L"       _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkA_xHqqkZx_ abcasdf    _xZkqqHx_iEkA_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iCkAiCkCiCkEiCkGiCkIiEkA_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkFiEjPiEjPiEjPiEjPiEkGiEjPiEkD_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkA_xHqqkZx_    _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_      \r\n"
//L"       _xZkqqHx_iEkEiEjPiEjPiEkJiEjPiEkH_xHqqkZx_      \r\n"
//L"  _xZkqqHx_iBfOiBfP_xHqqkZx_       _xZkqqHx_iEkA_xHqqkZx_  _xZkqqHx_iEkEiEkC_xHqqkZx_    \r\n"
//L"_xZkqqHx_iBfO_xHqqkZx_    _xZkqqHx_iBfP_xHqqkZx_ _xZkqqHx_iEkBiEjPiEkIiEkC_xHqqkZx_  _xZkqqHx_iEkA_xHqqkZx_    \r\n"
//L"_xZkqqHx_iBfP_xHqqkZx_    _xZkqqHx_iBfO_xHqqkZx_ _xZkqqHx_iEkFiEjPiEjPiEkIiEjPiEkD_xHqqkZx_    \r\n"
//L"       _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkA_xHqqkZx_abcasdf     _xZkqqHx_iEkA_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkA_xHqqkZx_xxxafd      _xZkqqHx_iEkA_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkA_xHqqkZx_xxxa        _xZkqqHx_iEkA_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkFiEjPiEjPiEjPiEjPiEkGiEjPiEkD_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkBiEjPiEjPiEjPiEjPiEjPiEjPiEkC_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkA_xHqqkZx_     abcasdf_xZkqqHx_iEkA_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkA_xHqqkZx_      xxxafd_xZkqqHx_iEkA_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkA_xHqqkZx_        xxxa_xZkqqHx_iEkA_xHqqkZx_  \r\n"
//L"       _xZkqqHx_iEkFiEjPiEjPiEjPiEjPiEkGiEjPiEkD_xHqqkZx_  \r\n"
//L"  _xZkqqHx_iBfPiBfO_xHqqkZx_ _xZkqqHx_iEjPiEkD_xHqqkZx_              \r\n";
//
//		FFGetApp()->GetPopHint()->SetTargetInfo(wstrHint);
//	}
//} // FCToolBaseFDA::OnPursuerTextNeedInfo.
//----- 05.07.28 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnContextMenu
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iJeFiDhLiDfOiDjDiDeOiDiKiDgCiDeOiBfOiDiBiDgKiDiFiBfLiDhLiDfOiDjDiCmJiCoGiCmBiCmEiOmAiNhDiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			mmptMsc	:_xZkqqHx_iDeOiDiKiDgCiDeOiClDiCoKiClNiImKjChFiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnContextMenu (CDC* pDC, const DBLPoint& mmptMsc)
{
	// _xZkqqHx_iDeDiDhIiDjDiDgHiPiIjHjNiBeC_xHqqkZx_
	OnMsEvent(WM_CONTEXTMENU, pDC ,mmptMsc, 0);
} // FCToolBaseFDA::OnContextMenu.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnDraw
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iPjBiCkLjClMiClFiCmMiCmGiCkL_xHqqkZx_View_xZkqqHx_iCkJiCoHiOmAiNhDiClDiCoKiCoJ_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFfMiOkGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			pmmrtRgn:_xZkqqHx_iDiKiBfLiDfHiDiHiDjDjEhKjHpBiCpAiOhHjCoIiBeCiOgHiCoNiCmIiCkCiPoKiNiHiCmN_xHqqkZx_NULL_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			lRgnSize:pmmrtRgn_xZkqqHx_iCmMjEhKjHpBiDfEiDeDiDfJiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.24 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnDraw (CDC* pDC)
{
	TRACE(_T("FCToolBaseFDA::OnDraw\r\n"));
//----- 06.12.09 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	// _xZkqqHx_iDfOiBfLiDfBiDgCiDgHiDhNiBfLiDeOiCpAjFgAiJoGiBeC_xHqqkZx_
//	DrawMark(pDC, FALSE);
//----- 06.12.09 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	// _xZkqqHx_iMlLiNnNiCmMiPpDjBnEiCmJiKnGiClHiCoJjFgAiJoGiBeC_xHqqkZx_
	OnDrawState(pDC, GetCurrentState());
//----- 06.12.09 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
	// Superclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeCiKoOjGhLiCmMjBeJjBpAiDhNiBfLiDeOiCpAjFgAiJoGiBeC_xHqqkZx_
	BASE_CLASS::OnDraw(pDC);
} // FCToolBaseFDA::OnDraw.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::Select
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iClBiCmMiDgDiBfLiDiLiCkKjBeJjBpAiClDiCoKiClNiCmGiCkLiBeBiDfCiBfLiDiLiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	: CDC*
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::Select (CDC* pDC)
{
	// Superclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::Select(pDC);

	//----- _xZkqqHx_iDhNiDeFiDfIiDeKiBfLiDfMiDiLiKnGiMfH_xHqqkZx_ -----
	m_hIdleCursor = NULL;			// StateIdle_xZkqqHx_iOjOiCmMiDeKiBfLiDfMiDiLiDgOiDjDiDgIiDiLiBeC_xHqqkZx_

	//----- _xZkqqHx_iInKjDkOjAkHiMmAjApMiKnGjIeBjFmPjAjE_xHqqkZx_ -----
	m_mmptFix.SetPoint(0,0);
	m_mmlnvAry.clear();
	//----- _xZkqqHx_iDgDiBfLiDiLiCmMiPpDjBnEjFmPjAjE_xHqqkZx_ -----
	m_iCurState = STATE_IDLE;	// FDA_xZkqqHx_iCmMiMlLiNnNiCmMiPpDjBnEiBeC_xHqqkZx_
	m_mmptMsc.SetPoint(0,0);	// _xZkqqHx_iMlLiNnNiCmMiDhNiDeFiDfIiNmAjFfHiBeC_xHqqkZx_
	m_mmptCnv.SetPoint(0,0);	// _xZkqqHx_jFmPiKlHiMoDiDhNiDeFiDfIiNmAjFfHiBeC_xHqqkZx_
	m_dwFlags = 0;				// _xZkqqHx_jDkPiOjOiDeMiBfLiCmMiPpDjBnEiBeC_xHqqkZx_
	m_dwChar = 0;				// _xZkqqHx_iMlLiNnNiCmMiDeMiBfLiDfCiBfLiDgIiBeC_xHqqkZx_
	m_dwRepCnt = 0;				// _xZkqqHx_iDeMiBfLiDfCiBfLiDgIiCmMiDiKiDhDiBfLiDgHiPpDjBnEiBeC_xHqqkZx_
	m_dwCommand = 0;			// _xZkqqHx_iMlLiNnNiCmMiDfCiDhNiDjDiDgIiBeC_xHqqkZx_
	m_dwWParam = 0;				// WindowMessage_xZkqqHx_iCmM_xHqqkZx_wParam_xZkqqHx_iBeC_xHqqkZx_
	m_dwLParam = 0;				// WindowMessage_xZkqqHx_iCmM_xHqqkZx_lParam_xZkqqHx_iBeC_xHqqkZx_

	//----- _xZkqqHx_iDhNiDeFiDfIiDeKiBfLiDfMiDiLiCmMiCoEiCoHiCkMjGgIiOhO_xHqqkZx_ ------
	m_lShakeBtnDownFlag = 0;		// _xZkqqHx_iNlGiJeFiDhLiDfOiDjDiCmMiPpDjBnEiBeCiDhLiDfOiDjD_xHqqkZx_ON_xZkqqHx_iCmF_xHqqkZx_+1_xZkqqHx_iBeBiDhLiDfOiDjD_xHqqkZx_Off_xZkqqHx_iCmF_xHqqkZx_-1_xZkqqHx_iBeC_xHqqkZx_
	m_lShakeBtnDownPixel = 1;		// _xZkqqHx_iDhLiDfOiDjDiCkKiJjPiClDiCoKiClNiPpDjBnEiCmFiCmMiDhNiDeFiDfIiCmMiCoEiCoHiCkMiDhDiDeOiDfKiDiLjAjEiBeC_xHqqkZx_

	// _xZkqqHx_iDhNiBfLiDeOjFfMiOkGiNmAjFfHiCpAiDhNiBfLiDeOiOoNiCpAjAnNjCoIiBeC_xHqqkZx_
	m_mmptMarkNew.SetPoint(0,0);
	m_iCursorNew = FDPA_HIT_NONE;	// _xZkqqHx_iMlLiNnNiCmMiDeKiBfLiDfMiDiLiPoOjFpBiBeC_xHqqkZx_

	//----- _xZkqqHx_iDiCiDiKiDhGiMjPiNpFiMiLiJmK_xHqqkZx_ -----
	m_pHitMolipObj = NULL;		// _xZkqqHx_iDiKiDjDiDeOjFjEjFgJiBeC_xHqqkZx_
	m_lHitMolip = -1;			// _xZkqqHx_iDiKiDjDiDeOiDiCiDiKiDhGiBeC_xHqqkZx_

	//----- _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLjHhAjFmPjAjE_xHqqkZx_ -----
	m_mmptScrollBasePos = DBLPoint(0,0);	// _xZkqqHx_iDhNiDeFiDfIiDeKiBfLiDfMiDiLiKoOiPiAiImKjChFiBeC_xHqqkZx_
	// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiDhNiBfLiDeOiCmMjDmHiCnNiNjOiCnNiBeC_xHqqkZx_
	if (m_hIconScrollMark == NULL)
		m_hIconScrollMark = FFGetApp()->LoadIcon(IDI_MVSCRN_HANDLE);

	// _xZkqqHx_iDfOiBfLiDfBiDgCiDgHiDhNiBfLiDeOiCpAjFgAiJoGiBeC_xHqqkZx_
	DrawMark(pDC, FALSE);
} // FCToolBaseFDA::Select.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::Unselect
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iClBiCmMiDgDiBfLiDiLiCkKjBeJjBpAiJpAiPjMiClDiCoKiClNiCmGiCkLiBeBiDfCiBfLiDiLiClDiCoKiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.24 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::Unselect (CDC* pDC)
{
	// _xZkqqHx_iDfOiBfLiDfBiDgCiDgHiDhNiBfLiDeOiCpAiPmBiLiOiBeC_xHqqkZx_
	DrawMark(pDC, TRUE);
	// Superclass_xZkqqHx_iKnGjAjEiOmAiNhDiBeC_xHqqkZx_
	BASE_CLASS::Unselect(pDC);
} // FCToolBaseFDA::Unselect.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::GetCurrentState
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgDiBfLiDiLiCmMiMlLiNnNiCmMiPpDjBnEiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iMlLiNnNiCmMiPpDjBnEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.09.25 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
int FCToolBaseFDA::GetCurrentState () const
{
	return m_iCurState;
} // FCToolBaseFDA::GetCurrentState.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::GetDefaultIdleCursor
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	StateIdle_xZkqqHx_iCmFiDgGiDhEiDeIiDiLiDgHiCmJiOgHiCoNiCoKiCoJiDeKiBfLiDfMiDiLiDgOiDjDiDgIiDiLiCpAjFnEiClHiBeC_xHqqkZx_
 *			_xZkqqHx_jFfHiPiAiCmMiDeKiBfLiDfMiDiLiCmMiPoKiNiHiCmN_xHqqkZx_ NULL_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.07.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
HCURSOR FCToolBaseFDA::GetDefaultIdleCursor () const
{
	return NULL;
} // FCToolBaseFDA::GetDefaultIdleCursor.

//----- 01.07.19 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::SetIdleCursorId
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	StateIdle_xZkqqHx_iOjOiCmMiDeKiBfLiDfMiDiLiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.07.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolBaseFDA::SetIdleCursorId (DWORD dwCursorId)
//{
//	m_dwIdleCursorId = dwCursorId;
//} // FCToolBaseFDA::SetIdleCursorId.
//----- 01.07.19 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::SetIdleCursor
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	StateIdle_xZkqqHx_iOjOiCmMiDeKiBfLiDfMiDiLiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.07.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::SetIdleCursor (HCURSOR hCursor)
{
	m_hIdleCursor = hCursor;
} // FCToolBaseFDA::SetIdleCursor.
//----- 01.07.19 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnMsEvent
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDeFiDfIiDeDiDhIiDjDiDgHiCmJiJjOiClGiCmEiBeBiPpDjBnEjBeKiInKiCpAjDkOiCkJiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	iEvent	:_xZkqqHx_iDeDiDhIiDjDiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			mmptMsc	:_xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_iDeMiBfLiCpAjClCiCnHiCoJiDhEiDiJiDePiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDeDiDhIiDjDiDgHiCkKjGlDiCkCiPoKiNiHiCoAiPpDjBnEiCmNjBeKiInKiClHiCoJiClBiCmGiCkKiCkAiCoJiCmMiCmFiBeBiClLiCoKiCoAiPiIjHjNiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnMsEvent (int iEvent, CDC* pDC, const DBLPoint& mmptMsc, UINT nFlags)
{
//----- 06.12.26 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_iDgDiBfLiDiLjFmPiNfIjCiGiCkJiCmCiDeBiDeDiDgIiDiLiPpDjBnEiCmFiCkAiCoJiPoKiNiHiCmNiBeBiJlNiCoAiOpDiCkPjFhEiCkPiCmIiCkCiBeC_xHqqkZx_
	if (IsToolSwitching() && GetCurrentState() == STATE_IDLE)
		return;
//----- 06.12.26 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

//----- 01.12.13 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	//----- _xZkqqHx_iDhNiDeFiDfIiCmMiCoEiCoHiCkMjGgIiOhOiLeAjEfM_xHqqkZx_ -----
	switch (iEvent)
	{
	case WM_MOUSEMOVE:
	//----- _xZkqqHx_iDhNiDeFiDfIiInKjDkOiDeDiDhIiDjDiDgHiCmMiPoKiNiH_xHqqkZx_ -----
	{
		if (m_lShakeBtnDownFlag != 0)
		//----- _xZkqqHx_iDhLiDfOiDjDiCkKiJjPiClDiCoKiClNiPpDjBnEiCmFiBeBiDhNiDeFiDfIiCkKiCoEiCoHiCkCiCmFiCkCiCmIiCkC_xHqqkZx_ -----
		{
			if (m_lShakeBtnDownPixel < labs(mm2lg(m_mmptShakeBtnDownPoint.x - mmptMsc.x)) ||
				m_lShakeBtnDownPixel < labs(mm2lg(m_mmptShakeBtnDownPoint.y - mmptMsc.y)))
			//----- _xZkqqHx_iDhNiDeFiDfIiInKjDkOiCkKiOhHjCoIiDhDiDeOiDfKiDiLiCpAjClEiCkGiCoJiPoKiNiH_xHqqkZx_ -----
			{
				// _xZkqqHx_iCoEiCoHiCkMiDhEiDiJiDePiCpAiJpAiPjMiBeC_xHqqkZx_
				m_lShakeBtnDownFlag = 0;
			} else
			//----- _xZkqqHx_iDhNiDeFiDfIiInKjDkOiCkKiOhHjCoIiDhDiDeOiDfKiDiLiCpAjClEiCkGiCmIiCkCiPoKiNiH_xHqqkZx_ -----
			{
				// _xZkqqHx_iDhNiDeFiDfIiCmMiInKjDkOiCmN_xHqqkZx_"_xZkqqHx_iCoEiCoHiCkM_xHqqkZx_"_xZkqqHx_iCmGjElLjCgGiClDiCoKiBeBiJlNiCoAiPiIjHjNiClJiClIjFjMiLeBiBeC_xHqqkZx_
				return;
			}
		}
		break;
	}
	case WM_RBUTTONDOWN:
	case WM_LBUTTONDOWN:
	//----- _xZkqqHx_iDhNiDeFiDfIiNlGiDhLiDfOiDjDiDfPiDeFiDjDiCmMiPoKiNiH_xHqqkZx_ -----
	{
		if (m_lShakeBtnDownFlag == 0)
		//----- _xZkqqHx_iNlGiJeFiDhLiDfOiDjDiCmMiCmHiClPiCoHiCoA_xHqqkZx_Off_xZkqqHx_iCmMiPoKiNiH_xHqqkZx_ -----
		{
			// _xZkqqHx_iDhLiDfOiDjDiCkKiJjPiClDiCoKiClNiPpDjBnEiCmFiCmMiDhNiDeFiDfIiCmMiCoEiCoHiCkMiDhDiDeOiDfKiDiLjAjEiCmJiCfAiCpAjAnNjCoIiBeC_xHqqkZx_
			m_lShakeBtnDownPixel = 1;
			// _xZkqqHx_iDhLiDfOiDjDiCkKiJjPiClDiCoKiClNiCmGiCkLiCmMiNmAjFfHiCpAiLeMjIfOiBeC_xHqqkZx_
			m_mmptShakeBtnDownPoint = mmptMsc;
		}
		// _xZkqqHx_iNlGiJeFiDhLiDfOiDjDiCmMiPpDjBnEiBeCiDhLiDfOiDjD_xHqqkZx_ON_xZkqqHx_iCmF_xHqqkZx_+1_xZkqqHx_iBeBiDhLiDfOiDjD_xHqqkZx_Off_xZkqqHx_iCmF_xHqqkZx_-1_xZkqqHx_iBeC_xHqqkZx_
		m_lShakeBtnDownFlag++;
		break;
	}
	case WM_LBUTTONUP:
	case WM_RBUTTONUP:
	//----- _xZkqqHx_iDhNiDeFiDfIiNlGiDhLiDfOiDjDiDeBiDgCiDhGiCmMiPoKiNiH_xHqqkZx_ -----
	{
		if (m_lShakeBtnDownFlag != 0)
		//----- _xZkqqHx_iNlGiJeFiCkCiClIiCoKiCkJiCmMiDhLiDfOiDjDiCkK_xHqqkZx_ON_xZkqqHx_iCmMiPoKiNiH_xHqqkZx_ -----
		{
			// _xZkqqHx_iNlGiJeFiDhLiDfOiDjDiCmMiPpDjBnEiBeCiDhLiDfOiDjD_xHqqkZx_ON_xZkqqHx_iCmF_xHqqkZx_+1_xZkqqHx_iBeBiDhLiDfOiDjD_xHqqkZx_Off_xZkqqHx_iCmF_xHqqkZx_-1_xZkqqHx_iBeC_xHqqkZx_
			m_lShakeBtnDownFlag--;
		}
		break;
	}
	}

//----- 01.12.13 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

	// _xZkqqHx_iDhNiDeFiDfIiNmAjFfHiCkKjDkPiClGiBjFiDhNiDeFiDfIiInKjDkOiCmNjGlDiOiLiBeC_xHqqkZx_WM_LBUTTONDOWN_xZkqqHx_iCmMiMoDiCmJiDhNiDeFiDfIiCpA_xHqqkZx_
	// _xZkqqHx_iInKjDkOiClFiCmIiCkNiCmEiCoAiBeB_xHqqkZx_CanDelete_xZkqqHx_iBeB_xHqqkZx_CanProperties_xZkqqHx_jDjJiCkKjFmPiJlLiClHiCoJiCmG_xHqqkZx_WM_MOUSEMOVE
	// _xZkqqHx_iCkKjEkNjAlGiClHiCoJiPoKiNiHiCkKiCkAiCoJiBeC_xHqqkZx_
	if (iEvent == WM_MOUSEMOVE && m_mmptMsc == mmptMsc) return;
	// _xZkqqHx_iDhEiDiJiDePjFmPjAjEiLeMjIfOiBeC_xHqqkZx_
	m_dwFlags = nFlags;
	// _xZkqqHx_iDhNiDeFiDfIiImKjChFiCmMiNmAjFfHiCpAjFmPiKlHiBeC_xHqqkZx_
	m_mmptMsc = mmptMsc;
	m_mmptCnv = mmptMsc;
	FFLimitMP(m_mmptCnv, nFlags, m_mmptFix, m_mmlnvAry.begin(), m_mmlnvAry.size());

	// _xZkqqHx_iNmFiMoDiCmJiJeFiBeFiNlGiDhLiDfOiDjDiCkKiJjPiClDiCoKiClNiOjOiCmMiDhNiDeFiDfIiNmAjFfHiCpAjAnNjCoIiBeC_xHqqkZx_
	if (iEvent == WM_LBUTTONDOWN || iEvent == WM_RBUTTONDOWN) m_mmptLRButtonDown = mmptMsc;
	for (;;)
	{
		// _xZkqqHx_iPpDjBnEiCmMjBeKiInKiCpAiMjPiNpFiBeC_xHqqkZx_
		int iNewState = TransFDA(m_iCurState, iEvent);
		// _xZkqqHx_jBeKiInKiClFiCmIiCkCiPoKiNiHiCmNiPeJjHlJiBeC_xHqqkZx_
		if (iNewState == STATE_NONE) break;
		// _xZkqqHx_jBeKiInKiMoDiCmMiPpDjBnEiCpAjAnNjCoIiBeC_xHqqkZx_
		m_iCurState = iNewState;
		// _xZkqqHx_iPpDjBnEiCmJiJjOiClGiClNiPiIjHjNiBeC_xHqqkZx_
		StateFDA(m_iCurState, pDC);
		// _xZkqqHx_iDeDiDhIiDjDiDgHiCmJjGlDiClFiCpAjAnNjCoIiBeC_xHqqkZx_
		iEvent = WM_NULL;
	}
} // FCToolBaseFDA::OnMsEvent.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnKyEvent
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDeMiBfLiDeDiDhIiDjDiDgHiCmJiJjOiClGiCmEiBeBiPpDjBnEjBeKiInKiCpAjDkOiCkJiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	iEvent	:_xZkqqHx_iDeDiDhIiDjDiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nChar	:_xZkqqHx_iJjPiClDiCoKiClNiDeMiBfLiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nRepCnt	:_xZkqqHx_iDeMiBfLiCmMiDiKiDhDiBfLiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			nFlags	:_xZkqqHx_jDkPiOjOiCmJiJjPiClDiCoKiClNiDeMiBfLiCmMiPpDjBnEiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDeDiDhIiDjDiDgHiCkKjGlDiCkCiPoKiNiHiCoAiPpDjBnEiCmNjBeKiInKiClHiCoJiClBiCmGiCkKiCkAiCoJiCmMiCmFiBeBiClLiCoKiCoAiPiIjHjNiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnKyEvent (int iEvent, CDC* pDC, UINT nChar, UINT nRepCnt, UINT nFlags)
{
//----- 06.12.26 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_iDgDiBfLiDiLjFmPiNfIjCiGiCkJiCmCiDeBiDeDiDgIiDiLiPpDjBnEiCmFiCkAiCoJiPoKiNiHiCmNiBeBiJlNiCoAiOpDiCkPjFhEiCkPiCmIiCkCiBeC_xHqqkZx_
	if (IsToolSwitching() && GetCurrentState() == STATE_IDLE)
		return;
//----- 06.12.26 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

	// _xZkqqHx_iMlLiNnNiCmMiDeMiBfLiDfCiBfLiDgIiBeC_xHqqkZx_
	m_dwChar	= nChar;
	// _xZkqqHx_iDeMiBfLiDfCiBfLiDgIiCmMiDiKiDhDiBfLiDgHiPpDjBnEiBeC_xHqqkZx_
	m_dwRepCnt	= nRepCnt;
	// _xZkqqHx_iDhEiDiJiDePjFmPjAjEiLeMjIfOiBeC_xHqqkZx_
	m_dwFlags = nFlags;
//	ASSERT(m_dwFlags & MK_CONTROL == 0);
	for (;;)
	{
		// _xZkqqHx_iPpDjBnEiCmMjBeKiInKiCpAiMjPiNpFiBeC_xHqqkZx_
		int iNewState = TransFDA(m_iCurState, iEvent);
		// _xZkqqHx_jBeKiInKiClFiCmIiCkCiPoKiNiHiCmNiPeJjHlJiBeC_xHqqkZx_
		if (iNewState == STATE_NONE) break;
		// _xZkqqHx_jBeKiInKiMoDiCmMiPpDjBnEiCpAjAnNjCoIiBeC_xHqqkZx_
		m_iCurState = iNewState;
		// _xZkqqHx_iPpDjBnEiCmJiJjOiClGiClNiPiIjHjNiBeC_xHqqkZx_
		StateFDA(m_iCurState, pDC);
		// _xZkqqHx_iDeDiDhIiDjDiDgHiCmJjGlDiClFiCpAjAnNjCoIiBeC_xHqqkZx_
		iEvent = WM_NULL;
	}
} // FCToolBaseFDA::OnKyEvent.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnCmEvent
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfCiDhNiDjDiDgIiCmJiJjOiClGiCmEiBeBiPpDjBnEjBeKiInKiCpAjDkOiCkJiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC			:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			dwCommand	:_xZkqqHx_iDfCiDhNiDjDiDgIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDiBiDgCiDfKiBfLiDfHiCkKjGlDiCkCiPoKiNiHiCoAiPpDjBnEiCmNjBeKiInKiClHiCoJiClBiCmGiCkKiCkAiCoJiCmMiCmFiBeBiClLiCoKiCoAiPiIjHjNiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnCmEvent (CDC* pDC, DWORD dwCommand)
{
//	TRACE(_T("FCToolBaseFDA::OnCmEvent %d\n"), dwCommand);
//----- 06.12.26 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_iDgDiBfLiDiLjFmPiNfIjCiGiCkJiCmCiDeBiDeDiDgIiDiLiPpDjBnEiCmFiCkAiCoJiPoKiNiHiCmNiBeBiJlNiCoAiOpDiCkPjFhEiCkPiCmIiCkCiBeC_xHqqkZx_
	if (IsToolSwitching() && GetCurrentState() == STATE_IDLE)
		return;
//----- 06.12.26 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

	m_dwCommand = dwCommand;
	int iEvent = WM_COMMAND;
	for (;;)
	{
		// _xZkqqHx_iPpDjBnEiCmMjBeKiInKiCpAiMjPiNpFiBeC_xHqqkZx_
		int iNewState = TransFDA(m_iCurState, iEvent);
		// _xZkqqHx_jBeKiInKiClFiCmIiCkCiPoKiNiHiCmNiPeJjHlJiBeC_xHqqkZx_
		if (iNewState == STATE_NONE) break;
		// _xZkqqHx_jBeKiInKiMoDiCmMiPpDjBnEiCpAjAnNjCoIiBeC_xHqqkZx_
		m_iCurState = iNewState;
		// _xZkqqHx_iPpDjBnEiCmJiJjOiClGiClNiPiIjHjNiBeC_xHqqkZx_
		StateFDA(m_iCurState, pDC);
		// _xZkqqHx_iDeDiDhIiDjDiDgHiCmJjGlDiClFiCpAjAnNjCoIiBeC_xHqqkZx_
		iEvent = WM_NULL;
	}
} // FCToolBaseFDA::OnCmEvent.

//----- 01.11.11 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnTmEvent
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfOiDeDiDhNiBfLiCmJiJjOiClGiCmEiBeBiPpDjBnEjBeKiInKiCpAjDkOiCkJiClHiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDeDiDhIiDjDiDgHiCkKjGlDiCkCiPoKiNiHiCoAiPpDjBnEiCmNjBeKiInKiClHiCoJiClBiCmGiCkKiCkAiCoJiCmMiCmFiBeBiClLiCoKiCoAiPiIjHjNiClHiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.03.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolBaseFDA::OnTmEvent (CDC* pDC)
//{
//	// _xZkqqHx_iDfOiDeDiDhNiBfLiDeDiDhIiDjDiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
//	int iEvent = WM_TIMER;
//	for (;;)
//	{
//		// _xZkqqHx_iPpDjBnEiCmMjBeKiInKiCpAiMjPiNpFiBeC_xHqqkZx_
//		int iNewState = TransFDA(m_iCurState, iEvent);
//		// _xZkqqHx_jBeKiInKiClFiCmIiCkCiPoKiNiHiCmNiPeJjHlJiBeC_xHqqkZx_
//		if (iNewState == STATE_NONE) break;
//		// _xZkqqHx_jBeKiInKiMoDiCmMiPpDjBnEiCpAjAnNjCoIiBeC_xHqqkZx_
//		m_iCurState = iNewState;
//		// _xZkqqHx_iPpDjBnEiCmJiJjOiClGiClNiPiIjHjNiBeC_xHqqkZx_
//		StateFDA(m_iCurState, pDC);
//		// _xZkqqHx_iDeDiDhIiDjDiDgHiCmJjGlDiClFiCpAjAnNjCoIiBeC_xHqqkZx_
//		iEvent = WM_NULL;
//	}
//} // FCToolBaseFDA::OnTmEvent.
//----- 01.11.11 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::IsControl
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	m_dwFlags_xZkqqHx_iCkJiCoHiBeBiDfCiDjDiDgHiDiNiBfLiDiLiCkKiJjPiClDiCoKiCmEiCkCiCoJiCkJiCmHiCkEiCkJiCpAjElLjCgGiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iJjPiClDiCoKiCmEiCkCiCoJiPoKiNiHiCmN_xHqqkZx_ TRUE_xZkqqHx_iBeC_xHqqkZx_m_bControlInvert = TRUE _xZkqqHx_iCmFjElNjDfNiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.30 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL FCToolBaseFDA::IsControl () const
{
	return (m_dwFlags & MK_CONTROL) ? !m_bControlInvert : m_bControlInvert;
} // FCToolBaseFDA::IsControl.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::IsShift
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	m_dwFlags_xZkqqHx_iCkJiCoHiBeBiDfGiDhEiDgHiCkKiJjPiClDiCoKiCmEiCkCiCoJiCkJiCmHiCkEiCkJiCpAjElLjCgGiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iJjPiClDiCoKiCmEiCkCiCoJiPoKiNiHiCmN_xHqqkZx_ TRUE_xZkqqHx_iBeC_xHqqkZx_m_bShiftInvert = TRUE _xZkqqHx_iCmFjElNjDfNiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.30 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL FCToolBaseFDA::IsShift () const
{
	return (m_dwFlags & MK_SHIFT) ? !m_bShiftInvert : m_bShiftInvert;
} // FCToolBaseFDA::IsShift.

//----- 05.07.28 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::GetObjectHintText
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jCmHjAnFiDhBiDjDiDgHiCmJjFfMiOkGiClHiCoJiDiBiDgCiDfKiBfLiDfHiCpAiNoMjAkMiClHiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	wstrHint	:_xZkqqHx_iDiBiDgCiDfKiBfLiDfHiCpAjFnEiClHiBeC_xHqqkZx_
// *			pObj		:_xZkqqHx_iNoMjAkMiClHiCoJiDiBiDgCiDfKiBfLiDfHiCmMjBmOiPnLjFjEjFgJiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.07 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//void FCToolBaseFDA::GetObjectHintText (WString& wstrHint, const FCObjDynabase* pObj) const
//{
//	//	_xZkqqHx_jFjEjFgJiCmMiOoNjHnO_xHqqkZx_: %s\r\n
//	//	_xZkqqHx_iNlGiPoDiNmAjFfH_xHqqkZx_: (%f, %f)\r\n
//	//	_xZkqqHx_iJeFiJlKiNmAjFfH_xHqqkZx_: (%f, %f)\r\n
//	//	_xZkqqHx_jFjN_xHqqkZx_ x _xZkqqHx_iNiCiClD_xHqqkZx_: (%f, %f)\r\n
//	//	_xZkqqHx_jFjEjFgJiKhAjDhI_xHqqkZx_: %f\r\n
//	//	_xZkqqHx_iDgFiDeMiDfIiDgHiKhAjDhI_xHqqkZx_: %f\r\n
//	//	_xZkqqHx_iPiKjBkOiDiMiDeDiDiEiBfL_xHqqkZx_: %d.%s\r\n
//	//	_xZkqqHx_jFjEjFgJ_xHqqkZx_ID: %d\r\n
//	//	_xZkqqHx_iDiKiDjDiDeOjAoGiDiKiDfIiDgH_xHqqkZx_:\r\n
//	//	%s\r\n
//	//	_xZkqqHx_iDiKiDjDiDeOiMlDiDiKiDfIiDgH_xHqqkZx_\r\n
//	//	%s
//	WString wstrFormat;
//	wstrFormat.LoadString(IDS_FORM_OBJ_HINT);
//
//	// _xZkqqHx_jFjEjFgJiDhEiDiMiBfLiDiAiCpAiOoGjDlOiBeC_xHqqkZx_
//	DBLRect mmrtFrame = pObj->GetResizeFrame();
//
//	// _xZkqqHx_iDiKiDjDiDeOiMlDiDiKiDfIiDgHiOoGjDlOiBeC_xHqqkZx_
//	WString wstrObjLinkIn;
//	{
//		DWORDSet stObjIdLinkIn;
//		FCMolipRec rec;
//		rec.dwObjID = pObj->GetObjID();
//		rec.lMolipId = -1;
//		DWORDSet stAffected;
//		g_pDoc->LinkManager()->GetAffectedByTo(stAffected, rec);
//		DWORDSet::iterator iRec;
//		for (iRec = stAffected.begin(); iRec != stAffected.end(); iRec++)
//		{
//			const FCLinkRec* pRec = g_pDoc->LinkManager()->LinkIDtoLinkRec(*iRec);
//			ASSERT(pRec->m_mlpTo.dwObjID == rec.dwObjID);
//			stObjIdLinkIn.insert(pRec->m_mlpFrom.dwObjID);
//		}
//		DWORDSet::iterator iId;
//		long lC;
//		for (iId = stObjIdLinkIn.begin(), lC = 0; iId != stObjIdLinkIn.end(); iId++, lC++)
//		{
//			if (lC != 0 && (lC % 5) == 0)
//				wstrObjLinkIn += L"\r\n";
//			FCObjDynabase* pObjX = g_pDoc->ObjID2Object(*iId);
//			wstrObjLinkIn += FFFormatString(L"%d.%s,", *iId, FFObjTypeToStr(pObjX->Type()));
//		}
//		if (!wstrObjLinkIn.IsEmpty()) wstrObjLinkIn.ChopLast();
//	}
//
//	// _xZkqqHx_iDiKiDjDiDeOjAoGiDiKiDfIiDgHiOoGjDlOiBeC_xHqqkZx_
//	WString wstrObjLinkOut;
//	{
//		DWORDSet stObjIdLinkOut;
//		FCMolipRec rec;
//		rec.dwObjID = pObj->GetObjID();
//		rec.lMolipId = -1;
//		DWORDSet stAffected;
//		g_pDoc->LinkManager()->GetAffectedByFrom(stAffected, rec);
//		DWORDSet::iterator iRec;
//		for (iRec = stAffected.begin(); iRec != stAffected.end(); iRec++)
//		{
//			const FCLinkRec* pRec = g_pDoc->LinkManager()->LinkIDtoLinkRec(*iRec);
//			ASSERT(pRec->m_mlpFrom.dwObjID == rec.dwObjID);
//			stObjIdLinkOut.insert(pRec->m_mlpTo.dwObjID);
//		}
//		DWORDSet::iterator iId;
//		long lC;
//		for (iId = stObjIdLinkOut.begin(), lC = 0; iId != stObjIdLinkOut.end(); iId++, lC++)
//		{
//			if (lC != 0 && (lC % 5) == 0)
//				wstrObjLinkOut += L"\r\n";
//			FCObjDynabase* pObjX = g_pDoc->ObjID2Object(*iId);
//			wstrObjLinkOut += FFFormatString(L"%d.%s,", *iId, FFObjTypeToStr(pObjX->Type()));
//		}
//		if (!wstrObjLinkOut.IsEmpty()) wstrObjLinkOut.ChopLast();
//	}
//
//	// _xZkqqHx_iDiMiDeDiDiEiBfLiOoGjDlOiBeC_xHqqkZx_
//	DWORD dwSelLayerIdx = g_pDoc->ObjDynabaseToLZOrder(pObj).dwLayerIdx;
//	WString wstrLayerName;
//	g_pDoc->GetCurrentSheet()->GetLayerInfo(&wstrLayerName, NULL, dwSelLayerIdx);
//
//
//	//	_xZkqqHx_jFjEjFgJiCmMiOoNjHnO_xHqqkZx_: %s\r\n
//	//	_xZkqqHx_iNlGiPoDiNmAjFfH_xHqqkZx_: (%f, %f)\r\n
//	//	_xZkqqHx_iJeFiJlKiNmAjFfH_xHqqkZx_: (%f, %f)\r\n
//	//	_xZkqqHx_jFjN_xHqqkZx_ x _xZkqqHx_iNiCiClD_xHqqkZx_: (%f, %f)\r\n
//	//	_xZkqqHx_jFjEjFgJiKhAjDhI_xHqqkZx_: %f\r\n
//	//	_xZkqqHx_iDgFiDeMiDfIiDgHiKhAjDhI_xHqqkZx_: %f\r\n
//	//	_xZkqqHx_iPiKjBkOiDiMiDeDiDiEiBfL_xHqqkZx_: %d.%s\r\n
//	//	_xZkqqHx_jFjEjFgJ_xHqqkZx_ID: %d\r\n
//	//	_xZkqqHx_iDiKiDjDiDeOjAoGiDiKiDfIiDgH_xHqqkZx_:\r\n
//	//	%s\r\n
//	//	_xZkqqHx_iDiKiDjDiDeOiMlDiDiKiDfIiDgH_xHqqkZx_\r\n
//	//	%s
//	wstrHint.Format(wstrFormat.c_str(),
//					FFObjTypeToStr(pObj->Type()),
//					mm2hi(mmrtFrame.left), mm2hi(mmrtFrame.top),
//					mm2hi(mmrtFrame.right), mm2hi(mmrtFrame.bottom),
//					mm2hi(mmrtFrame.Width()), mm2hi(mmrtFrame.Height()),
//					pObj->GetAngle(),
//					pObj->GetTextAngle(),
//					dwSelLayerIdx, wstrLayerName.c_str(),
//					pObj->GetObjID(),
//					wstrObjLinkOut.c_str(),
//					wstrObjLinkIn.c_str());
//} // FCToolBaseFDA::GetObjectHintText.
//----- 05.07.28 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

//----- 06.12.09 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::OnDrawState
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iPjBiCkLjClMiClFiCmMiCmGiCkL_xHqqkZx_View_xZkqqHx_iCkJiCoHiOmAiNhDiClDiCoKiCoJ_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFfMiOkGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *			pmmrtRgn:_xZkqqHx_iDiKiBfLiDfHiDiHiDjDjEhKjHpBiCpAiOhHjCoIiBeCiOgHiCoNiCmIiCkCiPoKiNiHiCmN_xHqqkZx_NULL_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			lRgnSize:pmmrtRgn_xZkqqHx_iCmMjEhKjHpBiDfEiDeDiDfJiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.24 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::OnDrawState (CDC* pDC, int iState)
{
	TRACE(_T("FCToolBaseFDA::OnDrawState\r\n"));
	// _xZkqqHx_iDfOiBfLiDfBiDgCiDgHiDhNiBfLiDeOiCpAjFgAiJoGiBeC_xHqqkZx_
	DrawMark(pDC, FALSE);
} // FCToolBaseFDA::OnDrawState.
//----- 06.12.09 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::TransFDA
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iMiIjCoIjAkLjHeMiMmAiDeJiBfLiDgHiDhNiDgHiDjDiCmMjBeKiInKiCpAjFnEiClHiBeC_xHqqkZx_ToolBaseFDA.mdrw_xZkqqHx_iCpAiOfBiPmGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	iState	:_xZkqqHx_iMlLiNnNiCmMiPpDjBnEiCpAiOhHjCoIiBeC_xHqqkZx_
 *			iEvent	:_xZkqqHx_iDeDiDhIiDjDiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_jBeKiInKiMoDiCmMiPpDjBnEiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
int FCToolBaseFDA::TransFDA (int iState, int iEvent)
{	
	// _xZkqqHx_iInKiNhDjAoGiPpDjBnEiBeC_xHqqkZx_
	int iNextState = STATE_NONE;	// _xZkqqHx_iPpDjBnEjGlDiClFiBeC_xHqqkZx_
	// FDA_xZkqqHx_iCmMiMlLiNnNiCmMiPpDjBnEiBeC_xHqqkZx_
	switch (iState)
	{
	case STATE_IDLE:				// _xZkqqHx_jBnCiClPiBeC_xHqqkZx_
		switch (iEvent)
		{
		case WM_MOUSEMOVE:		// _xZkqqHx_iDhNiDeFiDfIiInKjDkOiBeC_xHqqkZx_
			iNextState = STATE_IDLE;		// _xZkqqHx_jBnCiClPiBeC_xHqqkZx_
			break;

		case WM_LBUTTONDBLCLK:	// _xZkqqHx_iNlGiDhLiDfOiDjDiDfPiDhFiDiLiDeOiDiKiDgCiDeOiBeC_xHqqkZx_
//			TRACE(_T("WM_LBUTTONDBLCLK\n"));
			iNextState = STATE_EXIT_TOOL_BY_BUTTON;	// _xZkqqHx_iDhNiDeFiDfIiDhLiDfOiDjDiCmJiCoGiCoIiDgDiBfLiDiLiPeJjHlJiBeC_xHqqkZx_
			break;
		case WM_CONTEXTMENU:	// _xZkqqHx_iDfCiDjDiDgFiDeMiDfIiDgHiDiBiDgKiDiFiBfLiBeC_xHqqkZx_
			if (FFCanEditObject() && CanLinkToSelection() &&
				m_iCursorNew != FDPA_HIT_NOT_MOLIP &&
				m_iCursorNew != FDPA_HIT_NONE)
				iNextState = STATE_CONTEXT_MENU_LINK;	// _xZkqqHx_iDiKiDjDiDeOiDiBiDgKiDiFiBfLjFfMiOkGiBeC_xHqqkZx_
			else
				iNextState = STATE_CONTEXT_MENU;		// _xZkqqHx_iJeFiDhLiDfOiDjDiDiBiDgKiDiFiBfLjFfMiOkGiBeC_xHqqkZx_
			break;
		case WM_MBUTTONDOWN:	// _xZkqqHx_jCiGiDhLiDfOiDjDiDfPiDeFiDjDiBeC_xHqqkZx_
			iNextState = STATE_ENTER_SCROLL_SCREEN;		// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLjDpMiMpLiBeC_xHqqkZx_
			break;
//----- 05.07.04 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
		case WM_COMMAND:		// _xZkqqHx_iDfCiDhNiDjDiDgIiBeC_xHqqkZx_
			if (m_dwCommand == ID_TLCMD_CANCEL)
				iNextState = STATE_CANCEL_TOOL;		// _xZkqqHx_iDgDiBfLiDiLiDeMiDiDiDjDiDfKiDiLiBeC_xHqqkZx_
			break;
//----- 05.07.04 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
//----- 05.07.27 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
		case WM_KEYDOWN:		// _xZkqqHx_iDeMiBfLiDfPiDeFiDjDiBeC_xHqqkZx_
			if (m_dwChar == VK_PRIOR || m_dwChar == VK_NEXT)	// PgaeUp|PgaeDown_xZkqqHx_iDeMiBfLiCmMiPoKiNiHiBeC_xHqqkZx_
				iNextState = STATE_PAGE_KEYDOWN;		// PageUp,PageDown_xZkqqHx_iDeMiBfLiBeC_xHqqkZx_
			break;
//----- 05.07.27 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
		}
		break;
	case STATE_EXIT_TOOL_BY_BUTTON:			// _xZkqqHx_iDhNiDeFiDfIiDhLiDfOiDjDiCmJiCoGiCoIiDgDiBfLiDiLiPeJjHlJiBeC_xHqqkZx_
		iNextState = STATE_IDLE;			// _xZkqqHx_jBnCiClPiBeC_xHqqkZx_
		break;
//----- 05.07.04 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	case STATE_CANCEL_TOOL:			// _xZkqqHx_iDgDiBfLiDiLiDeMiDiDiDjDiDfKiDiLiBeC_xHqqkZx_
		iNextState = STATE_IDLE;			// _xZkqqHx_jBnCiClPiBeC_xHqqkZx_
		break;
//----- 05.07.04 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

	case STATE_CONTEXT_MENU:		// _xZkqqHx_iJeFiDhLiDfOiDjDiDiBiDgKiDiFiBfLjFfMiOkGiBeC_xHqqkZx_
		iNextState = STATE_IDLE;			// _xZkqqHx_jBnCiClPiBeC_xHqqkZx_
		break;
	case STATE_CONTEXT_MENU_LINK:		// _xZkqqHx_iDiKiDjDiDeOiDiBiDgKiDiFiBfLjFfMiOkGiBeC_xHqqkZx_
		switch (iEvent)
		{
		case WM_COMMAND:	// _xZkqqHx_iDfCiDhNiDjDiDgIiBeC_xHqqkZx_
			iNextState = STATE_LINK_COMMAND;	// _xZkqqHx_iDiKiDjDiDeOiDfCiDhNiDjDiDgIiBeC_xHqqkZx_
			break;
		}
		break;
	case STATE_LINK_COMMAND:		// _xZkqqHx_iDiKiDjDiDeOiDfCiDhNiDjDiDgIiBeC_xHqqkZx_
		iNextState = STATE_IDLE;			// _xZkqqHx_jBnCiClPiBeC_xHqqkZx_
		break;

//----- 01.11.10 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	case STATE_ENTER_SCROLL_SCREEN:	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLjDpMiMpLiBeC_xHqqkZx_
		switch (iEvent)
		{
		case WM_ACTIVATEAPP:	// _xZkqqHx_iDeBiDhGiDiKiCmMjAnIiCoIjBnGiCkGiBeC_xHqqkZx_
			iNextState = STATE_EXIT_SCROLL_SCREEN;	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiPgPiMpLiBeC_xHqqkZx_
			break;
		case WM_MBUTTONUP:		// _xZkqqHx_jCiGiDhLiDfOiDjDiDeBiDgCiDhGiBeC_xHqqkZx_
			iNextState = STATE_START_SCROLL_SCREEN;	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiKeKiOgOiBeC_xHqqkZx_
			break;
		case WM_MOUSEMOVE:		// _xZkqqHx_iDhNiDeFiDfIiInKjDkOiBeC_xHqqkZx_
			iNextState = STATE_HAND_SCROLL_SCREEN;	// _xZkqqHx_iOoIiMfOiDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiBeC_xHqqkZx_
			break;
		}
		break;

	case STATE_START_SCROLL_SCREEN:	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiKeKiOgOiBeC_xHqqkZx_
		iNextState = STATE_SCROLLING_SCREEN;	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLjCiGiBeC_xHqqkZx_
		break;

	case STATE_SCROLLING_SCREEN:	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLjCiGiBeC_xHqqkZx_
		switch (iEvent)
		{
		case WM_ACTIVATEAPP:	// _xZkqqHx_iDeBiDhGiDiKiCmMjAnIiCoIjBnGiCkGiBeC_xHqqkZx_
		case WM_LBUTTONDOWN:	// _xZkqqHx_iNlGiDhLiDfOiDjDiDfPiDeFiDjDiBeC_xHqqkZx_
		case WM_RBUTTONDOWN:	// _xZkqqHx_iJeFiDhLiDfOiDjDiDfPiDeFiDjDiBeC_xHqqkZx_
		case WM_MBUTTONDOWN:	// _xZkqqHx_jCiGiDhLiDfOiDjDiDfPiDeFiDjDiBeC_xHqqkZx_
		case WM_MOUSEWHEEL:		// _xZkqqHx_iDhNiDeFiDfIiDhKiDeDiBfLiDiLiBeC_xHqqkZx_
			iNextState = STATE_STOP_SCROLL_SCREEN;	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiPeJjHlJiBeC_xHqqkZx_
			break;
		case WM_TIMER:		// _xZkqqHx_iDfOiDeDiDhNiBfLiKiEiCoIiNjOiCnNiBeC_xHqqkZx_
			iNextState = STATE_SCROLLING_SCREEN;	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLjCiGiBeC_xHqqkZx_
			break;
		}
		break;

	case STATE_STOP_SCROLL_SCREEN:	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiPeJjHlJiBeC_xHqqkZx_
		iNextState = STATE_EXIT_SCROLL_SCREEN;	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiPgPiMpLiBeC_xHqqkZx_
		break;

	case STATE_EXIT_SCROLL_SCREEN:	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiPgPiMpLiBeC_xHqqkZx_
		iNextState = STATE_IDLE;			// _xZkqqHx_jBnCiClPiBeC_xHqqkZx_
		break;

	case STATE_HAND_SCROLL_SCREEN:	// _xZkqqHx_iOoIiMfOiDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiBeC_xHqqkZx_
		switch (iEvent)
		{
		case WM_ACTIVATEAPP:	// _xZkqqHx_iDeBiDhGiDiKiCmMjAnIiCoIjBnGiCkGiBeC_xHqqkZx_
		case WM_MBUTTONUP:		// _xZkqqHx_jCiGiDhLiDfOiDjDiDeBiDgCiDhGiBeC_xHqqkZx_
			iNextState = STATE_EXIT_SCROLL_SCREEN;	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiPgPiMpLiBeC_xHqqkZx_
			break;
		case WM_MOUSEMOVE:		// _xZkqqHx_iDhNiDeFiDfIiInKjDkOiBeC_xHqqkZx_
			iNextState = STATE_HAND_SCROLL_SCREEN;	// _xZkqqHx_iOoIiMfOiDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiBeC_xHqqkZx_
			break;
		}
		break;
//----- 01.11.10 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	case STATE_PAGE_KEYDOWN:		// PageUp,PageDown_xZkqqHx_iDeMiBfLiBeC_xHqqkZx_
		iNextState = STATE_IDLE;	// _xZkqqHx_jBnCiClPiBeC_xHqqkZx_
		break;
	}
	return iNextState;
} // FCToolBaseFDA::TransFDA.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateFDA
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iPpDjBnEiCmJiJjOiClGiClNiPiIjHjNiCpAiOmAiNhDiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	iState	:_xZkqqHx_iMlLiNnNiCmMiPpDjBnEiCpAiOhHjCoIiBeC_xHqqkZx_
 *			pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateFDA (int iState, CDC* pDC)
{
	// FDA_xZkqqHx_iCmMiOjPiCmMiPpDjBnEiBeC_xHqqkZx_
	switch (iState)
	{
	case STATE_NONE:				// _xZkqqHx_iPpDjBnEjGlDiClFiBeC_xHqqkZx_
		break;
	case STATE_IDLE:				// _xZkqqHx_jBnCiClPiBeC_xHqqkZx_
		StateIdle(pDC);
		break;
	case STATE_EXIT_TOOL_BY_BUTTON:	// _xZkqqHx_iDhNiDeFiDfIiDhLiDfOiDjDiCmJiCoGiCoIiDgDiBfLiDiLiPeJjHlJiBeC_xHqqkZx_
		StateExitToolByButton(pDC);
		break;
//----- 05.07.04 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	case STATE_CANCEL_TOOL:			// _xZkqqHx_iDgDiBfLiDiLiDeMiDiDiDjDiDfKiDiLiBeC_xHqqkZx_
		StateCancelTool(pDC);
		break;
//----- 05.07.04 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	case STATE_CONTEXT_MENU:		// _xZkqqHx_iJeFiDhLiDfOiDjDiDiBiDgKiDiFiBfLjFfMiOkGiBeC_xHqqkZx_
		StateContextMenu(pDC);
		break;
	case STATE_CONTEXT_MENU_LINK:	// _xZkqqHx_iDiKiDjDiDeOiDiBiDgKiDiFiBfLjFfMiOkGiBeC_xHqqkZx_
		StateContextMenuLink(pDC);
		break;
	case STATE_LINK_COMMAND:		// _xZkqqHx_iDiKiDjDiDeOiDfCiDhNiDjDiDgIiBeC_xHqqkZx_
		StateLinkCommand(pDC);
		break;
//----- 01.11.10 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	case STATE_ENTER_SCROLL_SCREEN:		// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLjDpMiMpLiBeC_xHqqkZx_
		StateEnterScrollScreen(pDC);
		break;
	case STATE_START_SCROLL_SCREEN:		// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiKeKiOgOiBeC_xHqqkZx_
		StateStartScrollScreen(pDC);
		break;
	case STATE_SCROLLING_SCREEN:			// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLjCiGiBeC_xHqqkZx_
		StateScrollingScreen(pDC);
		break;
	case STATE_STOP_SCROLL_SCREEN:		// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiPeJjHlJiBeC_xHqqkZx_
		StateStopScrollScreen(pDC);
		break;
	case STATE_EXIT_SCROLL_SCREEN:		// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiPgPiMpLiBeC_xHqqkZx_
		StateExitScrollScreen(pDC);
		break;
	case STATE_HAND_SCROLL_SCREEN:		// _xZkqqHx_iOoIiMfOiDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiBeC_xHqqkZx_
		StateHandScrollScreen(pDC);
		break;
//----- 01.11.10 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
//----- 05.07.27 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	case STATE_PAGE_KEYDOWN:		// PageUp,PageDown_xZkqqHx_iDeMiBfLiBeC_xHqqkZx_
		StatePageKeydown(pDC);
		break;
//----- 05.07.27 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	}
} // FCToolBaseFDA::StateFDA.

//----- 05.07.04 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::CheckHitObject
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiPoDiCmFiCmMiDhNiDeFiDfIiDhBiDgCiDgHiCpAjClCiCnHiCoJiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pHitObj	:_xZkqqHx_iDhBiDgCiDgHiClFiClNjFjEjFgJiCpAjFnEiClHiBeCiDhBiDgCiDgHiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_ NULL_xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
// *			wFlag		:_xZkqqHx_iDiMiDeDiDiEiBfLiDeBiDeOiDfKiDfIiDhEiDiJiDePiCpAiOhHjCoIiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDhBiDgCiDgHiClFiClNiPoKiNiHiCmN_xHqqkZx_ TRUE_xZkqqHx_iBeBiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_ FALSE _xZkqqHx_iCpAjFnEiClHiBeC_xHqqkZx_
// *
// * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	m_pHitObj _xZkqqHx_iCmJiDhBiDgCiDgHiClFiClNjFjEjFgJiCpAjFnEiClHiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.14 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *			00.11.24 Fukushiro M. ToolSelect_xZkqqHx_iCkJiCoHiInKjDkOiBeCiIpIjAjEjCmHiJmBiBeC_xHqqkZx_
// *			00.12.30 Fukushiro M. _xZkqqHx_iDiMiDeDiDiEiBfLiDeBiDeOiDfKiDfIiDhEiDiJiDePiCpAjCmHiJmBiBeC_xHqqkZx_
// *************************************************************************/
//BOOL FCToolBaseFDA::CheckHitObject (FCObjDynabase*& pHitObj, WORD wFlag) const
//{
//	// _xZkqqHx_iMjPiNpFiMiLiJmKiCmMjFmPjAjEiCpAiPiJiKpKiJlLiBeC_xHqqkZx_
//	pHitObj = g_pDoc->GetIntersectObject(m_mmptMsc, NULL, wFlag);
//	//------ _xZkqqHx_jFjEjFgJiCmMiPoDiCmFiCmMiDeOiDiKiDgCiDeOiCkJiCmHiCkEiCkJjClCiCnHiCoJ_xHqqkZx_ -----
//	if (pHitObj != NULL) return TRUE;
//	return FALSE;
//} // FCToolBaseFDA::CheckHitObject.
//----- 05.07.04 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::DrawMark
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDhNiDeFiDfIiInKjDkOiOjOiCmJjFfMiOkGiClDiCoKiCoJiDhMiDiKiDfDiDjDjDfPiCmMiDhNiBfLiDeOiCpAjFgAiJoGiBgJiPmBiLiOiBgKiClHiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC		:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiBeC_xHqqkZx_
 *			bErase	:_xZkqqHx_iPmBiLiOiClHiCoJiOjOiCmN_xHqqkZx_ TRUE_xZkqqHx_iBeBjFgAiJoGiClHiCoJiOjOiCmN_xHqqkZx_ FALSE_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.05.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *			00.01.05 Fukushiro M. _xZkqqHx_iNmAjFfHiOhHjCoIiCpAiPmBiLiOiBeC_xHqqkZx_
 *			01.04.24 Fukushiro M. ToolBasePolyCreate_xZkqqHx_iCkJiCoHiInKjDkOiBeC_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::DrawMark (CDC* pDC, BOOL bErase)
{
	TRACE(_T("FCToolBaseFDA::DrawMark\n"));
	CPoint lgpt;
	FTMolipKind iCursor;
	if (bErase)
	//----- _xZkqqHx_iDhNiBfLiDeOiPmBiLiOiCmMiPoKiNiH_xHqqkZx_ -----
	{
		lgpt = mm2lg(m_mmptMarkOld);
		// _xZkqqHx_iDeKiBfLiDfMiDiLiMgAiPpDiCpAjAnNjCoIiBeC_xHqqkZx_
		iCursor = m_iCursorOld;
	} else
	//----- _xZkqqHx_iDhNiBfLiDeOjFgAiJoGiCmMiPoKiNiH_xHqqkZx_ -----
	{
		lgpt = mm2lg(m_mmptMarkNew);
		// _xZkqqHx_iDeKiBfLiDfMiDiLiMgAiPpDiCpAjAnNjCoIiBeC_xHqqkZx_
		iCursor = m_iCursorNew;
		m_mmptMarkOld = m_mmptMarkNew;
		m_iCursorOld = m_iCursorNew;
	}
	// _xZkqqHx_iDeKiBfLiDfMiDiLjFgAiJoGiBeC_xHqqkZx_
	FCLinkManager::DrawCursor(pDC, lgpt, iCursor);
} // FCToolBaseFDA::DrawMark.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateIdle
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jBnCiClPiPiIjHjNiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.06 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateIdle (CDC* pDC)
{
//	TRACE(_T("FCToolBaseFDA::StateIdle\r\n"));
//----------<NOT EXPORT TO VIEWER>-----------
	if (FFCanEditObject() && CanLinkToSelection() && IsControl())
	{
		TRACE(_T("FCToolBaseFDA::StateIdle 2\r\n"));
		FTMolipSet stIgnore;
		GetIgnoreForSearchLink(stIgnore);
		// _xZkqqHx_iDiCiDiKiDhGiMjPiNpFiBeCiDhBiDgCiDgHiDeKiBfLiDfMiDiLiCpAjAnNjCoIiBeC_xHqqkZx_
		DBLPoint mmptHitPos;
		m_pHitMolipObj = NULL;		// _xZkqqHx_iDiKiDjDiDeOjFjEjFgJiBeC_xHqqkZx_
		m_lHitMolip = -1;			// _xZkqqHx_iDiKiDjDiDeOiDiCiDiKiDhGiBeC_xHqqkZx_
		m_iCursorNew = FCLinkManager::GetHitOnMolip(m_pHitMolipObj,
													m_lHitMolip,
													mmptHitPos,
													m_mmptMsc,
													&stIgnore);
		// _xZkqqHx_iDiCiDiKiDhGiPoDiDhBiDgCiDgHiCmMiPoKiNiHiCmNiBeBiDhNiDeFiDfIiNmAjFfHiCpAiDiCiDiKiDhGiNmAjFfHiCmJjFoCjAlDiBeC_xHqqkZx_
		if (m_iCursorNew != FDPA_HIT_NOT_MOLIP) m_mmptCnv = mmptHitPos;
	}
//----------</NOT EXPORT TO VIEWER>-----------

	// _xZkqqHx_jAfGiClFiCkCiDhNiBfLiDeOiNmAjFfHjAnNjCoIiBeC_xHqqkZx_
	m_mmptMarkNew = m_mmptCnv;
	// _xZkqqHx_iDfOiBfLiDfBiDgCiDgHiDhNiBfLiDeOiCpAiPmBiLiOiBeC_xHqqkZx_
	DrawMark(pDC, TRUE);
	// _xZkqqHx_iDfOiBfLiDfBiDgCiDgHiDhNiBfLiDeOiCpAjFgAiJoGiBeC_xHqqkZx_
	DrawMark(pDC, FALSE);
	// _xZkqqHx_iDiLiBfLiDiJiBfLiDhNiDeFiDfIiDhNiBfLiDeKiBfLiBjFiDfIiDgFiBfLiDfOiDfIjFfMiOkGiBeC_xHqqkZx_
	if (m_iCursorNew == FDPA_HIT_NONE)
		FFGetMainWnd()->MoveRulerMMK(1, m_mmptMsc, m_strIdleStatus);
	else
		FFGetMainWnd()->MoveRulerMMK(1, m_mmptMarkNew, m_strIdleStatus);
			// _xZkqqHx_iDhNiBfLiDeOiImKjChFiCpAiDiLiBfLiDiJiBfLiDhNiDeFiDfIiDhNiBfLiDeKiBfLiCmJjFfMiOkGiBeC_xHqqkZx_

	//----- _xZkqqHx_iDeKiBfLiDfMiDiLjAnNjCoI_xHqqkZx_ -----
//----- 03.07.24 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_iDfGiBfLiDgHiCkKiPiAjEpFiCmFiCkLiCmEiCkCiCmIiCkCiPoKiNiHiCmNiNlLiOjOiMhGiDeKiBfLiDfMiDiLiCpAjAnNjCoIiBeC_xHqqkZx_
	if (!g_pDoc->IsCurrentSheetReady())
		m_hIdleCursor = FFGetApp()->LoadStandardCursor(IDC_WAIT);
//----- 03.07.24 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	if (m_hIdleCursor == NULL)
		m_hIdleCursor = GetDefaultIdleCursor();
	FFGetMainWnd()->SetCurCursor(g_pView, m_hIdleCursor);
	// StateIdle_xZkqqHx_iOjOiCmMiDeKiBfLiDfMiDiLjFmPjAjEiCpAiPiJiKpKiJlLiBeC_xHqqkZx_
	m_hIdleCursor = NULL;

	// _xZkqqHx_iDeBiDeDiDgIiDiLiOjOiCmMiDfIiDgFiBfLiDfOiDfIiDgPiBfLjFfMiOkGjFlGiOjKiBeC_xHqqkZx_
	m_strIdleStatus.Empty();
} // FCToolBaseFDA::StateIdle.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateExitToolByButton
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgDiBfLiDiLiPeJjHlJiPiIjHjNiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	00.01.17 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateExitToolByButton (CDC* pDC)
{
//	TRACE(_T("FCToolBaseFDA::StateExitToolByButton\r\n"));
	// _xZkqqHx_iDhLiDfOiDjDiCmMiDiNiDgCiDeOiCpAiJpAiPjMiBeC_xHqqkZx_
	SetLockStatus(FALSE);
	// _xZkqqHx_jBeJjBpAiDgDiBfLiDiLiCnGjFmPiNfIiBeC_xHqqkZx_
	EndOfSession();

	// _xZkqqHx_iClBiClBiCkKiMmEiCmOiCoKiCoJiCmMiCmNiBeBjFnCiPfHjCiGiCmMjFjEjFgJiCkJiCoHjHkDiCoKiClNiPoKiPiKiCpAiDhNiDeFiDfIiCmF_xHqqkZx_
	// _xZkqqHx_iDeOiDiKiDgCiDeOiClFiClNiPoKiNiHiCmFiCkAiCoJiBeC_xHqqkZx_
	// _xZkqqHx_iClBiCmMiClNiCnPiBeBiDeOiDiKiDgCiDeOiClFiClNiPoKiPiKiCmMjFjEjFgJiCkKiNmEiCnBjBeJjBpAiClDiCoKiCoJiCoGiCkEiBeB_xHqqkZx_
	// _xZkqqHx_iDhNiDeFiDfIiDhLiDfOiDjDiCmMiDeDiDhIiDjDiDgHiCpAjBjHjFhEiClHiCoJiBeC_xHqqkZx_

//----- 05.06.06 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	// _xZkqqHx_iNmFiMoDiCmJiDeOiDiKiDgCiDeOiClFiClNiNmAjFfHiCpAiOoGjDlOiBeC_xHqqkZx_
	CPoint lgptLast = mm2lg(g_pView->GetLastPoint());
	g_pView->LPtoDP(lgptLast);
	POINTS pnt = {lgptLast.x, lgptLast.y};
	//----- _xZkqqHx_iNmFiMoDiCmJiDeOiDiKiDgCiDeOiClFiClNiNmAjFfHiCpAiDhAiDiJiDiBiBfLiDfOiCmJiBeB_xHqqkZx_BtnDown/BtnUp_xZkqqHx_iCpAjBjHjFhE_xHqqkZx_ -----
	LPARAM lParam = *((LPARAM*)&pnt);
//----- 06.03.23 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	g_pView->PostMessage(WM_LBUTTONDOWN, 0, lParam);
//	g_pView->PostMessage(WM_LBUTTONUP, 0, lParam);
//----- 06.03.23 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	FFPostSendMessage(FD_PMSG_VIEW, WM_LBUTTONDOWN, 0, lParam);
	FFPostSendMessage(FD_PMSG_VIEW, WM_LBUTTONUP, 0, lParam);
//----- 06.03.23 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
//----- 05.06.06 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
} // FCToolBaseFDA::StateExitToolByButton.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateCancelTool
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDgDiBfLiDiLiDeMiDiDiDjDiDfKiDiLiPiIjHjNiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.04 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateCancelTool (CDC* pDC)
{
//	TRACE(_T("FCToolBaseFDA::StateCancelTool\r\n"));
	if (g_pView->GetCurrentTool() != g_pToolManager->CommandID2Tool(g_pDoc->GetStdTool()))
	//----- _xZkqqHx_iMlLiNnNiCmMiDgDiBfLiDiLiCkKjBeJjBpAiDgDiBfLiDiLiCmFiCmNiCmIiCkCiPoKiNiH_xHqqkZx_ -----
	{
//----- 06.03.31 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//		// _xZkqqHx_jBeJjBpAiDgDiBfLiDiLiCnGiInKjDkOiBeC_xHqqkZx_
//		g_pView->PostMessage(WM_COMMAND, ID_TOOL_SELECT, (LPARAM)0);
//----- 06.03.31 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
		// _xZkqqHx_iDhLiDfOiDjDiCmMiDiNiDgCiDeOiCpAiJpAiPjMiBeC_xHqqkZx_
		SetLockStatus(FALSE);
		// _xZkqqHx_jBeJjBpAiDgDiBfLiDiLiCnGjFmPiNfIiBeC_xHqqkZx_
		EndOfSession();
//----- 06.03.31 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
	} else
	//----- _xZkqqHx_iMlLiNnNiCmMiDgDiBfLiDiLiCkKiDgDiBfLiDiLiCmMiPoKiNiH_xHqqkZx_ -----
	{
		// _xZkqqHx_jBeJjBpAiJpAiPjMiBeC_xHqqkZx_
		if (!g_pView->SelectObjVector().empty())
			g_pView->ClearSelectObj(pDC);
	}
} // FCToolBaseFDA::StateCancelTool.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateContextMenu
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iJeFiDhLiDfOiDjDiDiBiDgKiDiFiBfLjFfMiOkGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateContextMenu (CDC* pDC)
{
//	TRACE(_T("FCToolBaseFDA::StateContextMenu\r\n"));
	// _xZkqqHx_iDfEiDhFiDiBiDgKiDiFiBfLjFfMiOkGiCkKjGlDiCkCiPoKiNiHiCmNjFjMiLeBiBeC_xHqqkZx_
	if (GetSubMenuIndex() == -1) return;
//----- 01.04.24 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	CMenu menu;
//	if (menu.LoadMenu(IDR_RBTN_TOOL))
//	{
//		// _xZkqqHx_iDgGiDgPiDeDiDfIiNmAjFfHiBeC_xHqqkZx_
//		CPoint dvpt = mm2lg(m_mmptMsc);
//		// _xZkqqHx_iDgGiDgPiDeDiDfIiNmAjFfHiCnGjFmPiKlH_xHqqkZx_.
//		g_pView->LPtoDP(dvpt, pDC);
//		// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiNmAjFfHiCnGjFmPiKlH_xHqqkZx_.
//		g_pView->ClientToScreen(&dvpt);
//		CMenu* pPopup = menu.GetSubMenu(GetSubMenuIndex());
//		ASSERT(pPopup != NULL);
//		// _xZkqqHx_iNlGjHjIiCkLiCmJjAnNjCoIiCmIiCoHiCmOiBeBiDiBiDgKiDiFiBfLiCpAjFmPiNfIiBeC_xHqqkZx_
//		if (g_pReg->GetIsLeftHand())
//			::RightByLeftHand(pPopup->m_hMenu, TRUE);
//		pPopup->TrackPopupMenu(TPM_RIGHTBUTTON | TPM_LEFTALIGN,
//								dvpt.x, dvpt.y,
//								// route commands through main window.
//								AfxGetMainWnd());
//	}
//----- 01.04.24 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	// _xZkqqHx_iDfEiDhFiDiBiDgKiDiFiBfLiCpAiDhMiDgCiDhGiDeBiDgCiDhGiBeC_xHqqkZx_
// 06.02.24 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	FFPopupSubmenu(m_mmptMsc, IDR_RBTN_TOOL, GetSubMenuIndex(), AfxGetMainWnd());
	FFPopupSubmenu(m_mmptMsc, IDR_RBTN_TOOL, GetSubMenuIndex(), FFGetMainWnd()->GetWnd());
//----- 01.04.24 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
} // FCToolBaseFDA::StateContextMenu.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateContextMenuLink
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiKiDjDiDeOiDiBiDgKiDiFiBfLjFfMiOkGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.25 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateContextMenuLink (CDC* pDC)
{
//----------<NOT EXPORT TO VIEWER>-----------
//	TRACE(_T("FCToolBaseFDA::StateContextMenuLink\r\n"));
	// _xZkqqHx_iDfEiDhFiDiBiDgKiDiFiBfLiCpAiDhMiDgCiDhGiDeBiDgCiDhGiBeCiDiBiDgKiDiFiBfLiPeJjHlJiOjOiCmJiDhMiDgCiDhGiDeBiDgCiDhGiPeJjHlJiDfCiDhNiDjDiDgIiCpAjBjHjAeNiBeC_xHqqkZx_
	PopupLinkMenu();
//----------</NOT EXPORT TO VIEWER>-----------
} // FCToolBaseFDA::StateContextMenuLink.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateLinkCommand
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiKiDjDiDeOiDfCiDhNiDjDiDgIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.25 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateLinkCommand (CDC* pDC)
{
//----------<NOT EXPORT TO VIEWER>-----------
//	TRACE(_T("FCToolBaseFDA::StateLinkCommand\r\n"));
	// _xZkqqHx_iDiCiDiKiDhGiCkKiDhBiDgCiDgHiClFiCmEiCkCiCmIiCkCiPoKiNiHiCmNjFjMiLeBiBeC_xHqqkZx_
	if (m_pHitMolipObj == NULL) return;
	DWORD dwLinkKind = CommandToLinkKind(m_dwCommand, m_lHitMolip == -1);
	WORD wLinkKindA = dwLinkKind & 0xffff;
	WORD wLinkKindB = dwLinkKind >> 16;
	// _xZkqqHx_iDiKiDjDiDeOiCpAjCkDiCoJiClNiCnPiCmMiDiCiDiKiDhGiPfHiNiHiCpAjFnEiClHiBeC_xHqqkZx_
	FTMolipSet stLinkTo;
	GetSelectionForLink(stLinkTo);
	// _xZkqqHx_jAfGiClFiCkCiDiKiDjDiDeOiMlDiCpAiNoMjAkMiBeC_xHqqkZx_
	const FCMolipRec linkFrom(m_pHitMolipObj->GetObjID(), m_lHitMolip);
	// _xZkqqHx_iMmDiCkCiDiKiDjDiDeOiCpAiNoNiPjMiClFiBeBjAfGiClFiCkCiDiKiDjDiDeOiCpAiNoMjAkMiBeC_xHqqkZx_
	FCLinkManager::ReLink(linkFrom, stLinkTo, wLinkKindA);
	FCLinkManager::ReLink(stLinkTo, linkFrom, wLinkKindB);

//----------</NOT EXPORT TO VIEWER>-----------
} // FCToolBaseFDA::StateLinkCommand.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateEnterScrollScreen
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLjDpMiMpLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.11.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateEnterScrollScreen (CDC* pDC)
{
//	TRACE(_T("FCToolBaseFDA::StateEnterScrollScreen\r\n"));
	// _xZkqqHx_iClBiCmM_xHqqkZx_Window_xZkqqHx_iCmJiDeDiDhIiDjDiDgHiBeC_xHqqkZx_
	::FFSetCapture(g_pView->m_hWnd);
	// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiCpAiLnGiOhOiBeCiOoFiCmJiDhNiDeFiDfIiDhKiDeDiBfLiDiLiCpAiLnGiOhOiBeC_xHqqkZx_
	g_pView->SetIsProhibitWheel(TRUE);
	// _xZkqqHx_iOoIiMfOiCmMiDeKiBfLiDfMiDiLiCmJjFmPiNfIiBeC_xHqqkZx_
	HCURSOR hCursor = FFGetApp()->LoadCursor(IDC_CURSOR_HAND);
	FFGetMainWnd()->SetCurCursor(g_pView, hCursor);
	// _xZkqqHx_iDhNiDeFiDfIiDeKiBfLiDfMiDiLiKoOiPiAiImKjChFiCpAjAnNjCoIiBeC_xHqqkZx_
	m_mmptScrollBasePos = m_mmptMsc;
} // FCToolBaseFDA::StateEnterScrollScreen.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateStartScrollScreen
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiKeKiOgOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.11.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateStartScrollScreen (CDC* pDC)
{
//	TRACE(_T("FCToolBaseFDA::StateStartScrollScreen\r\n"));

	// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiDeKiBfLiDfMiDiLiCmJjFmPiNfIiBeC_xHqqkZx_
	HCURSOR hCursor = FFGetApp()->LoadCursor(IDC_CURSOR_MVSCRN_HANDLE);
	FFGetMainWnd()->SetCurCursor(g_pView, hCursor);

	// _xZkqqHx_iDhNiDeFiDfIiDeKiBfLiDfMiDiLiCmMiMlLiNnNiCmMiImKjChFiCpAiBeBiDfIiDeOiDiKiBfLiDjDiNmAjFfHiCmFiOoGjDlOiBeC_xHqqkZx_
	(void)::GetCursorPos(&m_dvptScrollBaseOrig);
	// _xZkqqHx_iDhNiDeFiDfIiDeKiBfLiDfMiDiLiKoOiPiAiImKjChFiCkJiCoHiBeBiKoOiPiAiDhNiBfLiDeOiImKjChFiCpAiOfKiPgPiBeC_xHqqkZx_
	g_pView->ScreenToClient(&m_dvptScrollBaseOrig);

	// 250msec_xZkqqHx_iClCiCmGiCmJiDfOiDeDiDhNiBfLiKiEiCoIiNjOiCnNiBeC_xHqqkZx_
	g_pView->SetToolTimer(TRUE);

	m_bitmapScrollBack.CreateCompatibleBitmap(pDC, 32, 32);

	// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiKoOiPiAiDhNiBfLiDeOjEhHiMgJiBeC_xHqqkZx_
	CDC dcBack;
	dcBack.CreateCompatibleDC(pDC);
	CBitmap* bmppBackOld = dcBack.SelectObject(&m_bitmapScrollBack);
	dcBack.BitBlt(0, 0, 32, 32, pDC, m_dvptScrollBaseOrig.x - 16,
				m_dvptScrollBaseOrig.y - 16, SRCCOPY);
	dcBack.SelectObject(bmppBackOld);
	dcBack.DeleteDC();

	//----- _xZkqqHx_iDhCiDgCiDgHiDhNiDgCiDhGiCpAiNoMjAkMiBeBjFfMiOkG_xHqqkZx_ -----

	// CDC_xZkqqHx_iCpA_xHqqkZx_Auto_xZkqqHx_iCmFiDiJiDgCiDhGiBeC_xHqqkZx_
	FCAutoDC atDC(pDC, FALSE, 0, 0);
	atDC.DrawIconEx(m_dvptScrollBaseOrig.x - 16, m_dvptScrollBaseOrig.y - 16,
					m_hIconScrollMark, 32, 32, 0, NULL, DI_NORMAL);

} // FCToolBaseFDA::StateStartScrollScreen.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateScrollingScreen
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLjCiGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.11.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateScrollingScreen (CDC* pDC)
{
//	TRACE(_T("FCToolBaseFDA::StateScrollingScreen\r\n"));

	// CDC_xZkqqHx_iCpA_xHqqkZx_Auto_xZkqqHx_iCmFiDiJiDgCiDhGiBeC_xHqqkZx_
	FCAutoDC atDC(pDC, FALSE, 0, 0);

	//----- _xZkqqHx_jEhHiMgJiCmMiDhCiDgCiDgHiDhNiDgCiDhGiCmFiMmDiCkCiKoOiPiAiDhNiBfLiDeOiCpAjDgIjCnHiClF_xHqqkZx_ -----
	CDC dcBack;
	dcBack.CreateCompatibleDC(pDC);
	CBitmap* bmppBackOld = dcBack.SelectObject(&m_bitmapScrollBack);
	atDC.BitBlt(m_dvptScrollBaseOrig.x - 16, m_dvptScrollBaseOrig.y - 16,
				32, 32, &dcBack, 0, 0, SRCCOPY);

	// _xZkqqHx_iDhNiDeFiDfIiDeKiBfLiDfMiDiLiCmMiMlLiNnNiCmMiImKjChFiCpAiBeBiDfIiDeOiDiKiBfLiDjDiNmAjFfHiCmFiOoGjDlOiBeC_xHqqkZx_
	CPoint dvptMsc;
	(void)::GetCursorPos(&dvptMsc);
	// _xZkqqHx_iDhNiDeFiDfIiDeKiBfLiDfMiDiLiKoOiPiAiImKjChFiCkJiCoHiBeBiKoOiPiAiDhNiBfLiDeOiImKjChFiCpAiOfKiPgPiBeC_xHqqkZx_
	g_pView->ScreenToClient(&dvptMsc);
	CSize szMoveTmp = dvptMsc - m_dvptScrollBaseOrig;

	CSize szMove;
	szMove.cx = (szMoveTmp.cx * szMoveTmp.cx) / 4;
	szMove.cy = (szMoveTmp.cy * szMoveTmp.cy) / 4;
	if (szMoveTmp.cx < 0) szMove.cx = -szMove.cx;
	if (szMoveTmp.cy < 0) szMove.cy = -szMove.cy;

	// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiCpAiLjGiJmCiBeC_xHqqkZx_
	g_pView->SetIsProhibitWheel(FALSE);
	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiCmMiDfIiDeOiDiNiBfLiDiLiImKjChFiCkJiCoHiInKjDkOjHmKiCpAiMlIiOfKiClFiClNiImKjChFiCnGiDfIiDeOiDiNiBfLiDiLiBeC_xHqqkZx_
	g_pView->ScrollToPosition(g_pView->GetScrollPosition() + szMove);
	// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiCpAiLnGiOhOiBeCiOoFiCmJiDhNiDeFiDfIiDhKiDeDiBfLiDiLiCpAiLnGiOhOiBeC_xHqqkZx_
	g_pView->SetIsProhibitWheel(TRUE);

	//----- _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiKoOiPiAiDhNiBfLiDeOiCmMjAfGiClFiCkCiImKjChFiCmMjEhHiMgJiCpAiOoGiCoIiNjOiCnO_xHqqkZx_ -----
	dcBack.BitBlt(0, 0, 32, 32, pDC, m_dvptScrollBaseOrig.x - 16,
					m_dvptScrollBaseOrig.y - 16, SRCCOPY);
	dcBack.SelectObject(bmppBackOld);
	dcBack.DeleteDC();

	//----- _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiKoOiPiAiDhNiBfLiDeOiCpAjFgAiJoG_xHqqkZx_ -----
	atDC.DrawIconEx(m_dvptScrollBaseOrig.x - 16, m_dvptScrollBaseOrig.y - 16,
					m_hIconScrollMark, 32, 32, 0, NULL, DI_NORMAL);

} // FCToolBaseFDA::StateScrollingScreen.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateStopScrollScreen
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiPeJjHlJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.11.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateStopScrollScreen (CDC* pDC)
{
//	TRACE(_T("FCToolBaseFDA::StateStopScrollScreen\r\n"));
	// _xZkqqHx_iDfOiDeDiDhNiBfLiKiEiCoIiNjOiCnNiCpAjCoCiOhOiBeC_xHqqkZx_
	g_pView->SetToolTimer(FALSE);

	// CDC_xZkqqHx_iCpA_xHqqkZx_Auto_xZkqqHx_iCmFiDiJiDgCiDhGiBeC_xHqqkZx_
	FCAutoDC atDC(pDC, FALSE, 0, 0);
	//----- _xZkqqHx_jEhHiMgJiCmMiDhCiDgCiDgHiDhNiDgCiDhGiCmFiMmDiCkCiKoOiPiAiDhNiBfLiDeOiCpAjDgIjCnHiClF_xHqqkZx_ -----
	CDC dcBack;
	dcBack.CreateCompatibleDC(pDC);
	CBitmap* bmppBackOld = dcBack.SelectObject(&m_bitmapScrollBack);
	atDC.BitBlt(m_dvptScrollBaseOrig.x - 16, m_dvptScrollBaseOrig.y - 16,
				32, 32, &dcBack, 0, 0, SRCCOPY);
	dcBack.SelectObject(bmppBackOld);
	dcBack.DeleteDC();

	// _xZkqqHx_iDhCiDgCiDgHiDhNiDgCiDhGiCpAiNoNiPjMiBeC_xHqqkZx_
	m_bitmapScrollBack.DeleteObject();
} // FCToolBaseFDA::StateStopScrollScreen.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateExitScrollScreen
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiPgPiMpLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.11.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateExitScrollScreen (CDC* pDC)
{
//	TRACE(_T("FCToolBaseFDA::StateExitScrollScreen\r\n"));
	// _xZkqqHx_iDhNiDeFiDfIiCmMjFnPiKgMiCpAiJpAiPjMiBeC_xHqqkZx_
	::FFReleaseCapture();
	// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiCpAiLjGiJmCiBeC_xHqqkZx_
	g_pView->SetIsProhibitWheel(FALSE);
} // FCToolBaseFDA::StateExitScrollScreen.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StateHandScrollScreen
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOoIiMfOiDfIiDeOiDiKiBfLiDjDiDfIiDeOiDiNiBfLiDiLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.11.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StateHandScrollScreen (CDC* pDC)
{
//	TRACE(_T("FCToolBaseFDA::StateHandScrollScreen\r\n"));
	// _xZkqqHx_iDhNiDeFiDfIiDeKiBfLiDfMiDiLiKoOiPiAiImKjChFiCkJiCoHiCmMiInKjDkOjHmKiBeC_xHqqkZx_
	DBLPoint mmptMove = m_mmptMsc - m_mmptScrollBasePos;
	// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiCpAiLjGiJmCiBeC_xHqqkZx_
	g_pView->SetIsProhibitWheel(FALSE);
	// _xZkqqHx_iDfIiDeOiDiKiBfLiDjDiCmMiDfIiDeOiDiNiBfLiDiLiImKjChFiCkJiCoHiInKjDkOjHmKiCpAiMlIiOfKiClFiClNiImKjChFiCnGiDfIiDeOiDiNiBfLiDiLiBeC_xHqqkZx_
	g_pView->ScrollToPosition(g_pView->GetScrollPosition() - mm2lg(mmptMove));
	// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiCpAiLnGiOhOiBeCiOoFiCmJiDhNiDeFiDfIiDhKiDeDiBfLiDiLiCpAiLnGiOhOiBeC_xHqqkZx_
	g_pView->SetIsProhibitWheel(TRUE);
} // FCToolBaseFDA::StateHandScrollScreen.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::StatePageKeydown
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	PageUp/PageDown_xZkqqHx_iDeMiBfLiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	pDC	:_xZkqqHx_jFgAiJoGjHhAiDgGiDgPiDeDiDfIiDfCiDjDiDgFiDeMiDfIiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.07.27 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::StatePageKeydown (CDC* pDC)
{
	// _xZkqqHx_iDfGiDhEiDgHiDeMiBfLiCkKiJjPiClDiCoKiCmEiCkCiCoJiCkJiBeI_xHqqkZx_IsShift_xZkqqHx_iCmNiBeBiDeMiBfLiDfPiDeFiDjDiOjOiCmJiCmNiOgHiCkGiCmIiCkCiBeC_xHqqkZx_
	const BOOL bShift = GetKeyState(VK_SHIFT) < 0;
	if (m_dwChar == VK_PRIOR)	// PgaeUp_xZkqqHx_iDeMiBfLiBeC_xHqqkZx_
	{
		if (bShift)
		{
			g_pView->SendMessage(WM_HSCROLL, MAKEWPARAM(SB_PAGEUP, 0), 0);
		} else
		{
			g_pView->SendMessage(WM_VSCROLL, MAKEWPARAM(SB_PAGEUP, 0), 0);
		}
	} else						// PgaeDown_xZkqqHx_iDeMiBfLiBeC_xHqqkZx_
	{
		if (bShift)
		{
			g_pView->SendMessage(WM_HSCROLL, MAKEWPARAM(SB_PAGEDOWN, 0), 0);
		} else
		{
			g_pView->SendMessage(WM_VSCROLL, MAKEWPARAM(SB_PAGEDOWN, 0), 0);
		}
	}
} // FCToolBaseFDA::StatePageKeydown.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::GetSubMenuIndex
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	FCToolBaseFDA::StateContextMenu _xZkqqHx_iCmFjFfMiOkGiClHiCoJiDfEiDhFiDiBiDgKiDiFiBfLiCmM_xHqqkZx_
 *			_xZkqqHx_iDeDiDjDiDgGiDgCiDeOiDfIiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
int FCToolBaseFDA::GetSubMenuIndex () const
{
	if(g_pView->SelectObjVector().size() != 0)
	{
		switch (g_->appMode & FD_APPMODE_MASK)
		{
		case FD_APPMODE_CHIPEDITOR:		// _xZkqqHx_iDgAiDgCiDhGiDeHiDgGiDeCiDfOiCmMiPoKiNiHiBeC_xHqqkZx_
			return FD_MENU_TOOL_BASE_ON_OBJECT_CHIPEDITOR;
		case FD_APPMODE_ARROWEDITOR:	// _xZkqqHx_iDeBiDiNiBfLiDeHiDgGiDeCiDfOiCmMiPoKiNiHiBeC_xHqqkZx_
			return FD_MENU_TOOL_BASE_ON_OBJECT_ARROWEDITOR;
		case FD_APPMODE_HISTORYVIEWER:	// _xZkqqHx_jHjKjHpAiDhCiDiFiBfLiDeBiDiCiBfLiDgIiBeC_xHqqkZx_
			return FD_MENU_TOOL_BASE_ON_OBJECT_HISTVIEW;
		default:
			return FD_MENU_TOOL_BASE_ON_OBJECT;
		}
	} else
	{
		switch (g_->appMode & FD_APPMODE_MASK)
		{
		case FD_APPMODE_HISTORYVIEWER:	// _xZkqqHx_jHjKjHpAiDhCiDiFiBfLiDeBiDiCiBfLiDgIiBeC_xHqqkZx_
			return FD_MENU_TOOL_BASE_ON_BACKGROUND_HISTVIEW;
		default:
			return FD_MENU_TOOL_BASE_ON_BACKGROUND;
		}
	}
} // FCToolBaseFDA::GetSubMenuIndex.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::CanLinkToSelection
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	Idle_xZkqqHx_iCmF_xHqqkZx_CTRL+MSMOVE_xZkqqHx_iCmFiDiKiDjDiDeOiCkKjCkDiCoKiCoJiCkJiBeI_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.26 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
BOOL FCToolBaseFDA::CanLinkToSelection () const
{
	return FALSE;
} // FCToolBaseFDA::CanLinkToSelection.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::GetSelectionForLink
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiKiDjDiDeOiCpAjCkDiCoJiClNiCnPiCmMiDiCiDiKiDhGiPfHiNiHiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	STATE_LINK_COMMAND_xZkqqHx_jAoKjHhAiCmMiKnGjAjEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.26 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::GetSelectionForLink (FTMolipSet& stMolip) const
{
	stMolip.clear();
	ObjDynabaseVector::const_iterator iObj;
	for (iObj = g_pView->SelectObjVector().begin();
		 iObj != g_pView->SelectObjVector().end(); iObj++)
		stMolip.insert(FCMolipRec((*iObj)->GetObjID(), -1));
} // FCToolBaseFDA::GetSelectionForLink.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::GetIgnoreForSearchLink
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiKiDjDiDeOiCpAiMjPiNpFiClHiCoJiCmGiCkLiCmJjGlDiOiLiClHiCoJiDiCiDiKiDhGiPfHiNiHiCpAjFnEiClHiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.26 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::GetIgnoreForSearchLink (FTMolipSet& stMolip) const
{
	GetSelectionForLink(stMolip);
} // FCToolBaseFDA::GetIgnoreForSearchLink.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::PopupLinkMenu
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iDiKiDjDiDeOiOoNiCmMiDiBiDgKiDiFiBfLiCpAjFfMiOkGiBeC_xHqqkZx_CONTEXT_MENU_LINK_xZkqqHx_iCmFiOgHjHhAiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.04.28 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
void FCToolBaseFDA::PopupLinkMenu () const
{
	// _xZkqqHx_iDfEiDhFiDiBiDgKiDiFiBfLiCpAiDhMiDgCiDhGiDeBiDgCiDhGiBeC_xHqqkZx_
// 06.02.24 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	FFPopupSubmenu(m_mmptMsc, IDR_RBTN_TOOL, FD_MENU_TOOL_BASE_LINK, AfxGetMainWnd(), m_dwTopCommand);
	FFPopupSubmenu(m_mmptMsc, IDR_RBTN_TOOL, FD_MENU_TOOL_BASE_LINK, FFGetMainWnd()->GetWnd(), m_dwTopCommand);
	// _xZkqqHx_iDhMiDgCiDhGiDeBiDgCiDhGiPeJjHlJiDfCiDhNiDjDiDgIiCpAjBjHjAeNiBeCiClBiCoKiCpAiClFiCmIiCkCiCmGiBeBiDhMiDgCiDhGiDeBiDgCiDhGiDiBiDgKiDiFiBfLiCmM_xHqqkZx_
	// _xZkqqHx_iCkCiClIiCoKiCoAjBeJiCmOiCoKiCmIiCkJiCmBiClNiOjOiCmJiPpDjBnEjBeKiInKiCmFiCkLiClIiDiNiDgCiDeOiClFiCmEiClFiCnMiCkEiBeC_xHqqkZx_
	AfxGetMainWnd()->PostMessage(WM_COMMAND, ID_TLCMD_POPUPMENU_ENDED, 0);
} // FCToolBaseFDA::PopupLinkMenu.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::CommandToLinkKind
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	PopupLinkMenu_xZkqqHx_iCmMiDiBiDgKiDiFiBfLiCkJiCoHiDiKiDjDiDeOiOoNiCpAiOoGjDlOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dwCommand			:_xZkqqHx_jCkDiCoJiDiKiDjDiDeOiCmMiOoNjHnOiCpAiOkGiClHiDfCiDhNiDjDiDgI_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsCenterMolipFrom	:_xZkqqHx_iDiKiDjDiDeOiMlDiCmMiDiCiDiKiDhGiCkKjCiGjAfDiDiCiDiKiDhGiCkJiBeIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDiKiDjDiDeOiOoNiBeCiDiKiDjDiDeOiCpAiNoMjAkMiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_ WORD(0)_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iDiKiDjDiDeOiMlDiBeBiDiKiDjDiDeOjAoGiDiCiDiKiDhGiCkKjCiGjAfDiDiCiDiKiDhGiCkJiCmHiCkEiCkJiCpAiOhHjCoIiClHiCoJ_xHqqkZx_
 *			CommandToLinkKindBoth_xZkqqHx_iKnGjAjEiCmJjBmOiClFiCmEiBeBiDiKiDjDiDeOiMlDiDiCiDiKiDhGiCmMiCnNiOhHjCoIiBeC_xHqqkZx_
 *			_xZkqqHx_iDiKiDjDiDeOjAoGiDiCiDiKiDhGiCmNiBeBiDgDiBfLiDiLiCmMiOoNjHnOiCmJiCoGiCmBiCmEjFmPiCoNiCoJiClNiCnPiBeBiDgDiBfLiDiL_xHqqkZx_
 *			_xZkqqHx_iCmJiClBiCmMiKnGjAjEiCmMiDgGiDhEiDeIiDiLiDgHiPiIjHjNiCpAiNhDiCoNiClJiCoJiClBiCmGiCmFiBeBiDgDiBfLiDiLiClCiCmGiCmM_xHqqkZx_
 *			_xZkqqHx_iDiKiDjDiDeOjAoGiDiCiDiKiDhGiOhHjCoIiCpAjFmPiNfIiClHiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iOoNjHnOiCkKjFmPiCoNiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.14 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
DWORD FCToolBaseFDA::CommandToLinkKind (DWORD dwCommand, BOOL bIsCenterMolipFrom)
{
	return CommandToLinkKindBoth(dwCommand, bIsCenterMolipFrom, TRUE);
} // FCToolBaseFDA::CommandToLinkKind.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCToolBaseFDA::CommandToLinkKindBoth
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	PopupLinkMenu_xZkqqHx_iCmMiDiBiDgKiDiFiBfLiCkJiCoHiDiKiDjDiDeOiOoNiCpAiOoGjDlOiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iIpIjAjE_xHqqkZx_>	dwCommand			:_xZkqqHx_jCkDiCoJiDiKiDjDiDeOiCmMiOoNjHnOiCpAiOkGiClHiDfCiDhNiDjDiDgI_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsCenterMolipFrom	:_xZkqqHx_iDiKiDjDiDeOiMlDiCmMiDiCiDiKiDhGiCkKjCiGjAfDiDiCiDiKiDhGiCkJiBeIiCpAiOhHjCoIiBeC_xHqqkZx_
 *			bIsCenterMolipTo	:_xZkqqHx_iDiKiDjDiDeOjAoGiCmMiDiCiDiKiDhGiCkKjCiGjAfDiDiCiDiKiDhGiCkJiBeIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jFnEjCgM_xHqqkZx_>	_xZkqqHx_iDiKiDjDiDeOiOoNiBeCiDiKiDjDiDeOiCpAiNoMjAkMiClFiCmIiCkCiPoKiNiHiCmN_xHqqkZx_ WORD(0)_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_iPnKiNnH_xHqqkZx_>	_xZkqqHx_iDiKiDjDiDeOiMlDiBeBiDiKiDjDiDeOjAoGiCmMiDiCiDiKiDhGiCkKjCiGjAfDiDiCiDiKiDhGiCkJiCmHiCkEiCkJiCmFiBeBiDiKiDjDiDeOiCmM_xHqqkZx_
 *			_xZkqqHx_iOoNjHnOiCkKjFmPiCoNiCoJiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	01.08.14 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
DWORD FCToolBaseFDA::CommandToLinkKindBoth (DWORD dwCommand,
										BOOL bIsCenterMolipFrom, BOOL bIsCenterMolipTo)
{
	WORD wLinkKindA = 0;
	WORD wLinkKindB = 0;
	switch (dwCommand)
	{
	case ID_TLCMD_MAKE_HORZ_LINK_OUT:
		m_dwTopCommand = dwCommand;		// _xZkqqHx_jHeEjAoGiDfCiDhNiDjDiDgIiCpAjAnNjCoIiBeC_xHqqkZx_
		if (bIsCenterMolipFrom)
			wLinkKindA = FDLM_LINK_ON_RATIO_X | FDLM_LINK_ON_NONE_Y;
		else
			wLinkKindA = FDLM_LINK_ON_COORD_X | FDLM_LINK_ON_NONE_Y;
		break;
	case ID_TLCMD_MAKE_VERT_LINK_OUT:
		m_dwTopCommand = dwCommand;		// _xZkqqHx_jHeEjAoGiDfCiDhNiDjDiDgIiCpAjAnNjCoIiBeC_xHqqkZx_
		if (bIsCenterMolipFrom)
			wLinkKindA = FDLM_LINK_ON_NONE_X | FDLM_LINK_ON_RATIO_Y;
		else
			wLinkKindA = FDLM_LINK_ON_NONE_X | FDLM_LINK_ON_COORD_Y;
		break;
	case ID_TLCMD_MAKE_LINK_OUT:		// _xZkqqHx_jCmKiPoNiDiKiDjDiDeOiBeC_xHqqkZx_
		m_dwTopCommand = dwCommand;		// _xZkqqHx_jHeEjAoGiDfCiDhNiDjDiDgIiCpAjAnNjCoIiBeC_xHqqkZx_
		if (bIsCenterMolipFrom)
			wLinkKindA = FDLM_LINK_ON_RATIO_X | FDLM_LINK_ON_RATIO_Y;
		else
			wLinkKindA = FDLM_LINK_ON_COORD_X | FDLM_LINK_ON_COORD_Y;
		break;
	case ID_TLCMD_MAKE_LINK_IN_OUT:		// _xZkqqHx_jBgPjFpLiMpMiDiKiDjDiDeOiBeC_xHqqkZx_
		m_dwTopCommand = dwCommand;		// _xZkqqHx_jHeEjAoGiDfCiDhNiDjDiDgIiCpAjAnNjCoIiBeC_xHqqkZx_
		if (bIsCenterMolipFrom)
			wLinkKindA = FDLM_LINK_ON_RATIO_X | FDLM_LINK_ON_RATIO_Y;
		else
			wLinkKindA = FDLM_LINK_ON_COORD_X | FDLM_LINK_ON_COORD_Y;
		if (bIsCenterMolipTo)
			wLinkKindB = FDLM_LINK_ON_RATIO_X | FDLM_LINK_ON_RATIO_Y;
		else
			wLinkKindB = FDLM_LINK_ON_COORD_X | FDLM_LINK_ON_COORD_Y;
		break;
	}
	return (DWORD(wLinkKindB) << 16) | DWORD(wLinkKindA);
} // FCToolBaseFDA::CommandToLinkKindBoth.

