#ifndef __FdExtern_h
#define __FdExtern_h

#pragma warning(disable: 4786)	// C4786_xZkqqHx_iMhIiNjAiCpAiPgPiCmIiCkNiClHiCoJiBeC_xHqqkZx_
#pragma warning(disable: 4503)	// C4503_xZkqqHx_iMhIiNjAiCpAiPgPiCmIiCkNiClHiCoJiBeC_xHqqkZx_

//----- 02.07.21 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ (A3_xZkqqHx_iJkBjClH_xHqqkZx_,_xZkqqHx_jHfNjEjC_xHqqkZx_0_xZkqqHx_iCmJjAnNjCoIiClFiBeBjHhAiOiGiCkCiCmBiCmPiCkCiCmJjBoFiCkLiCkCiOgMiKhAiCmFjFfMiOkGiCkKjHjAiCoKiCoJ_xHqqkZx_)-----
/*************************************************************************
 *					_xZkqqHx_jCiNiInDiOjGiNiA_xHqqkZx_
 *
 *	CRgn::PtInRegion _xZkqqHx_iCmNiBeB_xHqqkZx_95_xZkqqHx_iMgO_xHqqkZx_OS_xZkqqHx_iCmFiCmNiBeBiNmAjFfHjCgMiCmMiPoDiMmAiCkKiCkAiCoJiClNiCnPiBeBiOgHjHhAiCmJiCmN_xHqqkZx_
 *	_xZkqqHx_iPfMjFkKjCiNiInDiCpAjFkFiCkEiBeC_xHqqkZx_
 *************************************************************************/
//----- 02.07.21 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ (A3_xZkqqHx_iJkBjClH_xHqqkZx_,_xZkqqHx_jHfNjEjC_xHqqkZx_0_xZkqqHx_iCmJjAnNjCoIiClFiBeBjHhAiOiGiCkCiCmBiCmPiCkCiCmJjBoFiCkLiCkCiOgMiKhAiCmFjFfMiOkGiCkKjHjAiCoKiCoJ_xHqqkZx_)-----

//----- 02.06.06 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
/**********************************************************************
 *                      FDM_TRACE _xZkqqHx_iCmMjCoIiLgA_xHqqkZx_
 *
 * FDM_TRACE _xZkqqHx_iCmNiBe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ynamicDraw.exe_xZkqqHx_iCpAiOmAiNhDiBeC_xHqqkZx_
 * 6. DynamicDraw.exe_xZkqqHx_iCpAjBiAiNoMiClFiCmEiPeJjHlJiBeC_xHqqkZx_
 * 7. DdTracer.exe_xZkqqHx_iCmF_xHqqkZx_Save_xZkqqHx_iDhLiDfOiDjDiCpAiJjPiClFiCmEiDiNiDePiCpAjFnLjBlGiBeC_xHqqkZx_
 *
 * B_xZkqqHx_iDfOiDeDiDhGiOoIiPiH_xHqqkZx_
 * 1. MkFdmTrace.pl _xZkqqHx_iCmFjBfDiKnGjAjEiCmMiNmFiPiJiCmJ_xHqqkZx_FDM_TRACE _xZkqqHx_iCpAiPjBiCkLiNjOiCnOiBeC_xHqqkZx_
 * 2. _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiCmMjAnNjCoIiCmFiBeB_xHqqkZx__FDTRACE_B _xZkqqHx_iCpAjCoIiLgAiBeC_xHqqkZx_
 * 3. _xZkqqHx_iDhCiDiLiDgIiClHiCoJiBeC_xHqqkZx_
 * 4. DynamicDraw.exe_xZkqqHx_iCpAiOmAiNhDiBeC_xHqqkZx_
 * 5. DynamicDraw.exe_xZkqqHx_iCpAjBiAiNoMiClFiCmEiBeBiDiNiDePiCpAjFnLjBlGiClFiPeJjHlJiBeC_xHqqkZx_
 **********************************************************************/
#if defined(_FDTRACE_A) || defined(_FDTRACE_B)

extern void FFTrace (const _TCHAR* f, long l);
extern void FFTraceM (const _TCHAR* f, long l, const _TCHAR* tcpForm, ...);
extern void FFTraceInc ();
extern void FFTraceDec ();

struct __FdmTraceInc__
{
	__FdmTraceInc__ () { FFTraceInc(); }
	~__FdmTraceInc__ () { FFTraceDec(); }
};

//#define FDM_TRACE(f,l) __FdmTraceInc__ __fdmtr_##l; FFTrace(f,l)
#define FDM_TRACE(f,l) FFTrace(f,l)
#define FDM_TRACE1(f,l,s,x1) FFTraceM(f,l,s,x1)
#define FDM_TRACE2(f,l,s,x1,x2) FFTraceM(f,l,s,x1,x2)
#define FDM_TRACE3(f,l,s,x1,x2,x3) FFTraceM(f,l,s,x1,x2,x3)
#define FDM_TRACE4(f,l,s,x1,x2,x3,x4) FFTraceM(f,l,s,x1,x2,x3,x4)
#define FDM_TRACE5(f,l,s,x1,x2,x3,x4,x5) FFTraceM(f,l,s,x1,x2,x3,x4,x5)
#define FDM_TRACE6(f,l,s,x1,x2,x3,x4,x5,x6) FFTraceM(f,l,s,x1,x2,x3,x4,x5,x6)

#else // defined(_FDTRACE_A) || defined(_FDTRACE_B)

#define FDM_TRACE(f,l)
#define FDM_TRACE1(f,l,s,x1)
#define FDM_TRACE2(f,l,s,x1,x2)
#define FDM_TRACE3(f,l,s,x1,x2,x3)
#define FDM_TRACE4(f,l,s,x1,x2,x3,x4)
#define FDM_TRACE5(f,l,s,x1,x2,x3,x4,x5)
#define FDM_TRACE6(f,l,s,x1,x2,x3,x4,x5,x6)

#endif // defined(_FDTRACE_A) || defined(_FDTRACE_B)
//----- 02.06.06 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

/************************** _xZkqqHx_iNmAjFfHiMgOiDeOiDiJiDfI_xHqqkZx_ ************************/

//----- 05.02.03 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//#include "DBLMath.h"
//#include "DBLPoint.h"
//#include "DBLLine.h"
//#include "DBLRect.h"
//----- 05.02.03 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

#include <vector>
#include <memory>
#include <set>
#include <map>
#include <string>	// For WString.
#include <complex>

// STL_xZkqqHx_iCmMjGlMjBePiLpDiKnEiCpAjAnNjCoIiBeC_xHqqkZx_
using namespace std;

#if 0
// DynamicDraw_xZkqqHx_iCmFiCmNiOgHiCoNiCmIiCkCiCkKiBeB_xHqqkZx_SDK_xZkqqHx_iCmFiCmNjFeLjHhGiCmIiClNiCnPiBeB_xHqqkZx_if 0 _xZkqqHx_iCmFiImNiCkEiBeC_xHqqkZx_
//;----- <EXPORT TO SDK> -----;
#include "FCDBLMath.h"
#include "FCDBLPoint.h"
#include "FCDBLLine.h"
#include "FCDBLRect.h"
//;------ </EXPORT TO SDK> -----;
#endif//0

#include "DBLMath.h"
#include "DBLPoint.h"
#include "DBLLine.h"
#include "DBLRect.h"

//;----- <EXPORT TO SDK> -----;

/***********************************************************************
 * MolipDraw_xZkqqHx_iCmFiOgHiCoNiCoKiCoJiNmAjFfHiMgOiCmMjAoAjGlO_xHqqkZx_
 *
 *_xZkqqHx_iBhJiDgGiDgPiDeDiDfIiNmAjFfHiBhK_xHqqkZx_
 *	_xZkqqHx_iDgGiDgPiDeDiDfIiCmMiNmAjFfHiBeCjFgAiJoGjBmOiPnLiCmMiDeFiDeCiDjDiDgIiDeFiCmMiNlGiPoDiLpHiCkKiMlEjDfP_xHqqkZx_(0, 0)_xZkqqHx_iCmFiCkAiCoIiBeB_xHqqkZx_
 *	x_xZkqqHx_iOlCiCkKiJeFjFpLiMpMiBeB_xHqqkZx_y_xZkqqHx_iOlCiCkKiJlKjFpLiMpMiCmJiCfA_xHqqkZx_pixel_xZkqqHx_iCfAjCfAiImKiCmFjBjNiJmBiClHiCoJiBeC_xHqqkZx_
 *
 *_xZkqqHx_iBhJiDfIiDeOiDiKiBfLiDjDiNmAjFfHiBhK_xHqqkZx_
 *	_xZkqqHx_iDfIiDeOiDiKiBfLiDjDiDeFiDeCiDjDiDgIiDeFiCmFiCmMiDgGiDgPiDeDiDfIiNmAjFfHiBeCiDfIiDeOiDiKiBfLiDjDiNlGiPoDiLpHiCkKiMlEjDfPiCmGiCmIiCoJiBeC_xHqqkZx_
 *	_xZkqqHx_jFmPiKlHiClFiClNiCkCjBiKiOoIiCmMiDeFiDeCiDjDiDgIiDeFiCmM_xHqqkZx_ScreenToClient_xZkqqHx_iKnGjAjEiCmJiCoGiCmBiCmEiBeBiClLiCmM_xHqqkZx_
 *	_xZkqqHx_iDeFiDeCiDjDiDgIiDeFiCmMiDgGiDgPiD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D_xHqqkZx_
 * _xZkqqHx_iOmAiNmAjFfH_xHqqkZx_	_xZkqqHx_iBiB_xHqqkZx_ _xZkqqHx_iDhMiDeDiDjDiDgHiNmAjFfH_xHqqkZx_ _xZkqqHx_iBhO_xHqqkZx_ (_xZkqqHx_iCfBiCfEiBeEiCfD_xHqqkZx_ _xZkqqHx_iBiA_xHqqkZx_ _xZkqqHx_iCfGiCfB_xHqqkZx_)
 * _xZkqqHx_iOmAiNmAjFfH_xHqqkZx_	_xZkqqHx_iBiB_xHqqkZx_ _xZkqqHx_iCgHiCgIiNmAjFfH_xHqqkZx_ _xZkqqHx_iBhO_xHqqkZx_ FCRegData::GetUnitCoeff()
 **********************************************************************/

/***********************************************************************
 * HistoricDraw_xZkqqHx_iCmFiOgHiCoNiCoKiCoJjHhAiMoKiCmMjAoAjGlO_xHqqkZx_
 *
 *_xZkqqHx_iBhJjHjKjHpAiMfOjFlGiPjBiBhK_xHqqkZx_Hidocument
 *	_xZkqqHx_jHjKjHpAiCpAjFnLjBlGiClHiCoJiDfOiDeDiDhGiCmMjFlGiPjBiBeC_xHqqkZx_
 *
 *_xZkqqHx_iBhJjFlGiPjBiCmGjHjKjHpAiImKjChFiBhK_xHqqkZx_DHI(Document and Historic Index)
 *	_xZkqqHx_jFlGiPjBiCmGiBeBjHjKjHpAiImKjChFiBgJiDfKiDgCiDfGiDiHiDjDiDeDiDjDiDgGiDgCiDeOiDfIiBgKiCpAjDmBjCoIiClHiCoJiClBiCmGiCmFiBeB_xHqqkZx_
 *	_xZkqqHx_jHjKjHpAiMfOjFlGiPjBiCmJiCkIiCkPiCoJiBeBiCkAiCoJiOjOiKnEiOlCiCmMiImKjChFiCpAiOhHjCoIiCmFiCkLiCoJiBeC_xHqqkZx_
 **********************************************************************/

/**********************************************************************
 *                 _xZkqqHx_iBhJiDgOiDjDiDeLiDiKiBfLiLeMjGeAiBhK_xHqqkZx_
 *		a			_xZkqqHx_jEhKjHpB_xHqqkZx_(Array)
 *		b			_xZkqqHx_jIfPjHjNiMfO_xHqqkZx_(Bool)
 *		by			unsigned char(BYte)
 *		c			char(Char)
 *		cb			_xZkqqHx_jFlGiOjKjAjE_xHqqkZx_(Count of Byte)
 *		cr			_xZkqqHx_jAeG_xHqqkZx_(Color Reference value)
 *		cx,cy		short_xZkqqHx_iMfO_xHqqkZx_[_xZkqqHx_iNmAjFfH_xHqqkZx_(x,y)_xZkqqHx_iCmMiDeKiDeFiDjDiDfO_xHqqkZx_](Count of X,Y)
 *		dw			unsigned long_xZkqqHx_iMfO_xHqqkZx_(Double Word)
 *		fn			_xZkqqHx_iKnGjAjE_xHqqkZx_(FuNction)
 *		h			_xZkqqHx_iDgOiDjDiDgIiDiL_xHqqkZx_(Handle)
 *		i			int(Integer)
 *		l			long(Long)
 *		m			_xZkqqHx_iDeOiDiJiDfIiDiBiDjDiDgP_xHqqkZx_(data Member of a class)
 *		n			short_xZkqqHx_iIlNiCkCiCmN_xHqqkZx_int
 *		p			_xZkqqHx_iDhMiDeDiDjDiDfOiMfO_xHqqkZx_(Pointer)
 *		s			_xZkqqHx_jFlGiOjKjHpB_xHqqkZx_(String)
 *		sz			0_xZkqqHx_iCmFiPeJiCoNiCoJjFlGiOjKjHpB_xHqqkZx_(String terminated with Zero)
 *		tm			_xZkqqHx_iDgFiDeMiDfIiDgHjAkBjGeA_xHqqkZx_(Text Metric)
 *		w			unsigned short(Word)
 *		x,y			short_xZkqqHx_iMfOiNmAjFfHjCgM_xHqqkZx_
 *
 *		d			double_xZkqqHx_iMfO_xHqqkZx_
 *		f			float_xZkqqHx_iMfO_xHqqkZx_
 *		v			vector_xZkqqHx_iMfO_xHqqkZx_
 *		tw			TWIPS_xZkqqHx_iNmAjFfH_xHqqkZx_ long_xZkqqHx_iMfO_xHqqkZx_
 *		mm			_xZkqqHx_iDhOiDiKiNmAjFfH_xHqqkZx_ double_xZkqqHx_iMfO_xHqqkZx_
 *		lg			_xZkqqHx_jIfPjHjNiNmAjFfH_xHqqkZx_ long_xZkqqHx_iMfO_xHqqkZx_
 **********************************************************************/

class FCObjDynabase;
class CPropertyPage;
class COleClientItem;

// 06.02.26 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//class WString;

//----- 03.07.08 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
// DynamicDraw_xZkqqHx_iCmM_xHqqkZx_CLSID_xZkqqHx_iBeC_xHqqkZx_
#define DYNAMIC_DRAW_CLSID_ASTR "{6B73A07D-1F3A-4502-A920-57CFA19DE990}"
#define DYNAMIC_DRAW_CLSID_TSTR _T("{6B73A07D-1F3A-4502-A920-57CFA19DE990}")
#define DYNAMIC_DRAW_CLSID_WSTR L"{6B73A07D-1F3A-4502-A920-57CFA19DE990}"
#define DYNAMIC_DRAW_CLSID	{ 0x6b73a07d, 0x1f3a, 0x4502, { 0xa9, 0x20, 0x57, 0xcf, 0xa1, 0x9d, 0xe9, 0x90 } }
//----- 03.07.08 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

//----- Tool _xZkqqHx_iCmM_xHqqkZx_ID -----
// _xZkqqHx_jCiNiInDiBeJiBeJ_xHqqkZx_
// FCToolManager_xZkqqHx_iCmMiDgDiBfLiDiLjCoIiLgAiCmGjIeBjDkOiClFiCmEiCkCiCoJiClBiCmGiCmJjCiNiInDiBeC_xHqqkZx_

const DWORD FDTLIDX_SELECT		= 0;
const DWORD FDTLIDX_SELEDIT		= 1;
const DWORD FDTLIDX_ROTATE		= 2;
const DWORD FDTLIDX_ZOOM		= 3;
const DWORD FDTLIDX_CHIPPUT		= 4;
const DWORD FDTLIDX_LINE		= 5;
const DWORD FDTLIDX_RECT		= 6;
const DWORD FDTLIDX_RRECT		= 7;
const DWORD FDTLIDX_POLYGON		= 8;
const DWORD FDTLIDX_BEZIER		= 9;
const DWORD FDTLIDX_ARC			= 10;
const DWORD FDTLIDX_RICH_TEXT	= 11;
const DWORD FDTLIDX_POINT		= 12;
const DWORD FDTLIDX_LABEL_PUT	= 13;
const DWORD FDTLIDX_LINK		= 14;
const DWORD FDTLIDX_POLY_ARROW	= 15;
const DWORD FDTLIDX_BEZIER_ARROW = 16;
const DWORD FDTLIDX_WIDE_POLY	= 17;
const DWORD FDTLIDX_WIDE_BEZIER	= 18;
const DWORD FDTLIDX_WIDE_POLY_ARROW = 19;
const DWORD FDTLIDX_WIDE_BEZIER_ARROW = 20;
const DWORD FDTLIDX_TEXT_PUT	= 21;
const DWORD FDTLIDX_CHIP_PUT	= 22;
const DWORD FDTLIDX_EDIT_RICH_TEXT = 28;
//-----------------

// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiCmMiKgHjCkDiOhBiCpAiOhHjCoIiBeC_xHqqkZx_
// 06.02.14 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//#define FD_FILE_EXT_PROJECT			L".mdpj"	// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiDhEiDeAiDeDiDiLiBeC_xHqqkZx_
#define FD_FILE_EXT_TOP_GROUP		L".mdpj"	// _xZkqqHx_iDgHiDgCiDhGiDePiDiLiBfLiDhGiBeC_xHqqkZx_

#define FD_FILE_EXT_UNDO_WORK		L".udw"		// UNDO_xZkqqHx_iDiPiBfLiDeOiDgGiDeCiDiMiDeOiDgHiDiKiBeC_xHqqkZx_
#define FD_FILE_EXT_HEAP			L".hep"		// HEAP_xZkqqHx_iDgPiDgCiDhEiDeAiDgGiDeCiDiMiDeOiDgHiDiKiBeC_xHqqkZx_

// _xZkqqHx_jFlGiPjBiDgFiBfLiDhFiDiLiCmM_xHqqkZx_ID_xZkqqHx_iCpAiOhHjCoIiBeC_xHqqkZx_
#define FDHI_COMMAND_TABLE_ID		1L			// _xZkqqHx_iDfCiDhNiDjDiDgIiDgFiBfLiDhFiDiLiBeC_xHqqkZx_
#define FDHI_SUMMARY_TABLE_ID		2L			// _xZkqqHx_iDfEiDhNiDiKiBfLiDgFiBfLiDhFiDiLiBeC_xHqqkZx_
#define FDHI_FORK_TABLE_ID			3L			// _xZkqqHx_jHjKjHpAjFkKiKpCiDgFiBfLiDhFiDiLiBeC_xHqqkZx_
#define FDHI_SPOT_TABLE_ID			4L			// _xZkqqHx_iDfIiDhMiDgCiDgHiDgFiBfLiDhFiDiLiBeC_xHqqkZx_
#define FDHI_TERMINATE_TABLE_ID		5L			// _xZkqqHx_jHjKjHpAiPeJjCfLiDgFiBfLiDhFiDiLiBeC_xHqqkZx_

#define FD_FILE_EXT_STANDARD_FORMAT	L".mdrw"	// _xZkqqHx_jCmKiPoNiDhEiDeIiBfLiDhNiDgCiDgHiCmMjFlGiPjBiBeC_xHqqkZx_(.mdrw)
#define FD_FILE_EXT_PORTABLE_FORMAT	L".mdpf"	// _xZkqqHx_iDhMiBfLiDfOiDhFiDiLiDhEiDeIiBfLiDhNiDgCiDgHiCmMjFlGiPjBiBeC_xHqqkZx_(.mdpf)
#define FD_FILE_EXT_TEMPLATE_FORMAT	L".mdwt"	// _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiDhEiDeIiBfLiDhNiDgCiDgHiCmMjFlGiPjBiBeC_xHqqkZx_(.mdwt)
// 05.05.13 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//#define FD_FILE_EXT_VIEWER_FORMAT	L".mdvf"	// _xZkqqHx_iDhCiDiFiBfLiDeBiDhEiDeIiBfLiDhNiDgCiDgHiCmMjFlGiPjBiBeC_xHqqkZx_(.mdvf)
#define FD_FILE_EXT_WORK_FORMAT		L".mdwk"	// _xZkqqHx_iDiPiBfLiDeOiDhEiDeIiBfLiDhNiDgCiDgHiCmMjFlGiPjBiBeC_xHqqkZx_(.mdwk)

//----- 06.11.17 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
//----- ToolBase::OnPasteOverAs_xZkqqHx_jDjJiCmFjHhAiCkCiCoJjBkOjAkLiCmMiDhEiDiJiDeP_xHqqkZx_ -----
#define FD_PASTE_ATTR_TEXT			(1L << 0)		// _xZkqqHx_iDiKiDgCiDgAiDgFiDeMiDfIiDgH_xHqqkZx_/_xZkqqHx_iDhGiDiMiBfLiDjDiDgFiDeMiDfIiDgHiBeC_xHqqkZx_
#define FD_PASTE_ATTR_PLAIN_TEXT	(1L << 1)		// _xZkqqHx_iDhGiDiMiBfLiDjDiDgFiDeMiDfIiDgHiBeC_xHqqkZx_
#define FD_PASTE_ATTR_PEN			(1L << 2)		// _xZkqqHx_iDhJiDjDiBeC_xHqqkZx_
#define FD_PASTE_ATTR_BRUSH			(1L << 3)		// _xZkqqHx_iDhFiDiJiDfGiBeC_xHqqkZx_
#define FD_PASTE_ATTR_SHADOW		(1L << 4)		// _xZkqqHx_iJgFiBeC_xHqqkZx_
#define FD_PASTE_ATTR_EMFIMAGE		(1L << 5)		// _xZkqqHx_jEhHiMgJjAhNiBeC_xHqqkZx_
#define FD_PASTE_ATTR_ARROW			(1L << 6)		// _xZkqqHx_jGoOiIpDiBeC_xHqqkZx_
#define FD_PASTE_ATTR_SIZE			(1L << 7)		// _xZkqqHx_iDfEiDeDiDfJiBeC_xHqqkZx_
#define FD_PASTE_ATTR_EVERY_TEXT	(FD_PASTE_ATTR_TEXT | FD_PASTE_ATTR_PLAIN_TEXT)
#define FD_PASTE_ATTR_GRAPHICS		(FD_PASTE_ATTR_PEN | FD_PASTE_ATTR_BRUSH | FD_PASTE_ATTR_SHADOW | FD_PASTE_ATTR_EMFIMAGE | FD_PASTE_ATTR_ARROW)
#define FD_PASTE_ATTR_ALL			(FD_PASTE_ATTR_TEXT | FD_PASTE_ATTR_PLAIN_TEXT | FD_PASTE_ATTR_PEN | FD_PASTE_ATTR_BRUSH | FD_PASTE_ATTR_SHADOW | FD_PASTE_ATTR_EMFIMAGE | FD_PASTE_ATTR_ARROW | FD_PASTE_ATTR_SIZE)
//----- 06.11.17 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

// _xZkqqHx_iDhNiDgHiDiKiDgCiDeOiDfIiDfCiDjDiDgHiDiNiBfLiDiLiCmMjBeJjBpAiCpAjFmPiNfIiClFiClNiOjOiCmJjBjHjAeNiBeC_xHqqkZx_
#define WM_USER_MTRX_SELCHANGED			(WM_USER + 0x1000)
// _xZkqqHx_iDhNiDgHiDiKiDgCiDeOiDfIiDfCiDjDiDgHiDiNiBfLiDiLiCmMiDeBiDeDiDgFiDiAiCkKiDfPiDhFiDiLiDeOiDiKiDgCiDeOiClDiCoKiClNiOjOiCmJjBjHjAeNiBeC_xHqqkZx_
#define WM_USER_MTRX_LBTN_DBLCLKED		(WM_USER + 0x1002)

// _xZkqqHx_iDiGiBfLiDfFiDiKiDfIiDgHiDfCiDjDiDgHiDiNiBfLiDiLiCmMjBeJjBpAiCpAjFmPiNfIiClFiClNiOjOiCmJjBjHjAeNiBeC_xHqqkZx_
#define WM_USER_LISTCTRL_SELCHANGED		(WM_USER + 0x1005)
// _xZkqqHx_iDiGiBfLiDfFiDiKiDfIiDgHiDfCiDjDiDgHiDiNiBfLiDiLiCmMiDeBiDeDiDgFiDiAiCkKiDfPiDhFiDiLiDeOiDiKiDgCiDeOiClDiCoKiClNiOjOiCmJjBjHjAeNiBeC_xHqqkZx_
#define WM_USER_LISTCTRL_LBTN_DBLCLKED	(WM_USER + 0x1006)

//----- 05.05.01 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//// _xZkqqHx_iDhGiDiNiDhAiDgFiDeCiDfGiBfLiDgHiCmMiDhJiBfLiDfHiCpAiCnPiCkNiCoJiBeC_xHqqkZx_
//#define WM_USER_TURN_PROPERTY_PAGE		(WM_USER + 0x1007)
//----- 05.05.01 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
// CFCPursuerText _xZkqqHx_iCkKiPoOjFpBiCmMjAnNjCoIiCpAjHhGiLiBiClHiCoJiNnLiCmJjBjHjAeNiBeC_xHqqkZx_
#define WM_USER_PURSUER_TEXT_NEED_INFO	(WM_USER + 0x1007)

//----- 05.11.21 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
// _xZkqqHx_iDeBiDhGiDiKiDfAiBfLiDfGiDiHiDjDiNmFiPiJiCmMiLeOjDkOiOjOiBeC_xHqqkZx_
#define WM_USER_FIRST_EXECUTE			(WM_USER + 0x1008)
//----- 05.11.21 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

// _xZkqqHx_jDgPjIfOiDgAiDgCiDhGiCmMiDeBiDeDiDgFiDiAjAjEiCpAjFmPiNfIiClFiClNiOjOiBeBiDgAiDgCiDhGiDfIiDgHiDeBiCmMiDfEiDeDiDfJiNfIjAfGiCpAjBjHjAeNiBeC_xHqqkZx_
#define WM_USER_UPDATE_CHIP_STORE		(WM_USER + 0x1010)

//----- 06.10.26 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
// CFCStcImageList_xZkqqHx_iCmMiDeBiDeDiDgFiDiAjAjEiCpAjFmPiNfIiClFiClNiOjOiBeBjBjHjAeNiBeC_xHqqkZx_
#define WM_USER_IMGLST_SELCHANGED		(WM_USER + 0x1012)
//----- 06.10.26 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

// _xZkqqHx_iDgIiDeMiDiFiDiBiDjDiDgHjCiGiCmM_xHqqkZx_DSM_xZkqqHx_iCpAjFmPiNfIiClFiClNiOjOiDhEiDiMiBfLiDiAiCmJjBjHjFhEiBeC_xHqqkZx_
#define WM_USER_DSM_UPDATED				(WM_USER + 0x1015)


// _xZkqqHx_iDhCiDiFiBfLiCkKjDoAjFjEiCmJiLeMjIfOiClFiCmEiCkCiCoJiDfIiDeOiDiKiBfLiDjDiNmAjFfHiMgOiCmMiDeFiDeCiDjDiDgIiDeFiDfEiDeDiDfJiCpAiNfIjAfGiBeC_xHqqkZx_
#define WM_USER_UPDATE_VIEW_SCREEN_RECT	(WM_USER + 0x1020)

// _xZkqqHx_iDiLiBfLiDiJiBfLiCmMiDfEiDeDiDfJiPoOjFpBiCpAiNfIjAfGiBeC_xHqqkZx_
#define WM_USER_UPDATE_RULER			(WM_USER + 0x1030)

// CFCCmbBoxOnKey_xZkqqHx_iCmMiDeMiBfLjDpMjHmNiCpAjCmKjCgNiBeC_xHqqkZx_
#define WM_USER_CMB_BOX_ON_KEY			(WM_USER + 0x1040)

// CFCWndHistoryTree _xZkqqHx_iCmJiCkIiCkCiCmEiBeBiDhCiDiFiBfLiDiCiBfLiDgIiCkKjFmPiNfIiClDiCoKiClNiPoKiNiHiCmMjCmKjCgNiBeC_xHqqkZx_
#define WM_USER_WHT_VIEW_MODE_CHANGED	(WM_USER + 0x1050)
// CFCWndHistoryTree _xZkqqHx_iCmJiCkIiCkCiCmEiBeBjBeJjBpAjFlGiPjBiCkKjFmPiNfIiClDiCoKiClNiPoKiNiHiCmMjCmKjCgNiBeC_xHqqkZx_
#define WM_USER_WHT_SELCHANGED			(WM_USER + 0x1051)
// CFCWndHistoryTree _xZkqqHx_iCmJiCkIiCkCiCmEiBeBiNlGiDhLiDfOiDjDiCkKiJjPiClDiCoKiClNiPoKiNiHiCmMjCmKjCgNiBeC_xHqqkZx_
#define WM_USER_WHT_LBUTTONDOWN			(WM_USER + 0x1055)

// CFCListCtrlHidocument_xZkqqHx_iCkJiCoHiCmMiDiBiDgCiDfKiBfLiDfHiCmMjCmKjCgNiBeC_xHqqkZx_
#define WM_USER_LCH_DOC_SELCHANGED		(WM_USER + 0x1060)
#define WM_USER_LCH_ITEM_DBLCLK			(WM_USER + 0x1061)

// OnIdle_xZkqqHx_iOjOiCmJjCmKjCgNiClDiCoKiCoJiDiBiDgCiDfKiBfLiDfHiBeC_xHqqkZx_
#define WM_USER_ON_IDLE					(WM_USER + 0x1070)

// _xZkqqHx_iDgIiDeMiDiFiDiBiDjDiDgHjHhGiLiBiCpAjAnNjCoIiBjFiOmAiNhDiBeC_xHqqkZx_
#define WM_USER_PROCEED_DOC_REQUEST		(WM_USER + 0x10F0)

// View_xZkqqHx_iCmMiDfJiBfLiDiAjCgMiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
#define WM_USER_SET_ZOOM256				(WM_USER + 0x1100)
// RgnRedraw_xZkqqHx_iCpA_xHqqkZx_PostMessage_xZkqqHx_iCmFiOmAiNhDiBeC_xHqqkZx_
#define WM_USER_RGN_REDRAW				(WM_USER + 0x1101)
// _xZkqqHx_jHjKjHpAiNfMjBkCiDhCiDiFiBfLiCmMiDfJiBfLiDiAjCgMiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
#define WM_USER_SET_HIVIEW_ZOOM256		(WM_USER + 0x1102)
// _xZkqqHx_jHjKjHpAiInKjDkOjFpLjGeAiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
#define WM_USER_SET_HI_MOVE_OPERATION	(WM_USER + 0x1103)
// _xZkqqHx_iDfIiDgFiBfLiDfOiDfIiDgPiBfLiBeBiDhEiDeAiDjDiDeOiDfGiDiHiDjDiDgPiBfLjDjJiCmMjFfMiOkGiBeFjEpBjFfMiOkGiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
#define WM_USER_VIEW_SIZING_BAR_VISIBLE	(WM_USER + 0x1104)

// _xZkqqHx_iDiNiDgCiDeOiJpAiPjMiDiBiDgCiDfKiBfLiDfHiBeC_xHqqkZx_
#define WM_USER_UNLOCK_REQUEST			(WM_USER + 0x1110)

//----- ChipEditor_xZkqqHx_iCmG_xHqqkZx_MolipDraw/HistoricDraw_xZkqqHx_iCmMjCmKjAeNiDiBiDgCiDfKiBfLiDfH_xHqqkZx_ -----
#define WM_USER_TO_EDITDRAW				(WM_USER + 0x2002)
#define WM_USER_FROM_EDITDRAW			(WM_USER + 0x2003)
#define WM_USER_EDITDRAW_QUITED			(WM_USER + 0x2004)
#define WM_USER_MOLIPDRAW_QUIT			(WM_USER + 0x2005)
#define WM_USER_EDITDRAW_START			(WM_USER + 0x2006)

//----- WM_USER_TO_EDITDRAW_xZkqqHx_iCmM_xHqqkZx_wParam ------
// _xZkqqHx_iDeHiDgGiDeCiDgCiDgHiDgIiDiNiBfLiCkJiCoHiDiCiDiKiDhGiDgIiDiNiBfLiCmJjBjHjAeNiClDiCoKiCoJiBeC_xHqqkZx_
#define FDTC_RECEIVE_STREAM		1		// _xZkqqHx_iDfIiDgHiDiKiBfLiDiAjDpMjHmNjGlNjHnPiBeC_xHqqkZx_
#define FDTC_APP_CLOSE			2		// _xZkqqHx_iDeBiDhGiDiKiPeJjHlJjGlNjHnPiBeC_xHqqkZx_

//----- WM_USER_FROM_EDITDRAW_xZkqqHx_iCmM_xHqqkZx_wParam ------
// _xZkqqHx_iDeHiDgGiDeCiDgCiDgHiDgIiDiNiBfLiCkJiCoHiDiCiDiKiDhGiDgIiDiNiBfLiCmJjBjHjAeNiClDiCoKiCoJiBeC_xHqqkZx_
#define FDFC_RECEIVE_EDITDRAW_STREAM	1		// _xZkqqHx_iDgAiDgCiDhGiDgGiBfLiDfOiCmMiOpDiCkPiOoGiCoIjHhGiLiBiBeC_xHqqkZx_

// _xZkqqHx_iJpDiCoKiClNjFlGiPjBiBgJ_xHqqkZx_MolipDraw/HistoricDraw_xZkqqHx_iBgKiCmMiPeDjFjMiDiBiDgCiDfKiBfLiDfHiBeC_xHqqkZx_
#define WM_USER_REPAIR_DOCUMENT			(WM_USER + 0x2010)

// _xZkqqHx_iDfCiDhDiBfLiOjOiCmMiMhIiNjAiDiBiDgCiDfKiBfLiDfHiBeC_xHqqkZx_
#define WM_USER_COPY_WARNING			(WM_USER + 0x2015)

// _xZkqqHx_iDiLiBfLiDiJiBfLiCmMiDhNiBfLiDeKiBfLiInKjDkOiDiBiDgCiDfKiBfLiDfHiBeC_xHqqkZx_
#define WM_USER_RULER_MARKER			(WM_USER + 0x2020)
// _xZkqqHx_iDgDiBfLiDiLiDgPiBfLiCmMiDhLiDfOiDjDiCpAiDfPiDhFiDiLiDeOiDiKiDgCiDeOiBeC_xHqqkZx_
#define WM_USER_TOOLBAR_DBLCLK			(WM_USER + 0x2040)

// _xZkqqHx_iMlLiNnNiCmMiNhDiCmMiPoOjFpBiCkKjFmPiNfIiClDiCoKiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_CURRENT_LINE_UPDATED	(WM_USER + 0x2060)

// _xZkqqHx_iDiMiDfHiDfIiDgHiDiKjDgPjIfOiCmMiKmCiLkLiBgJjAeGiBeFiDhEiDeIiDjDiDgHiBeFjCfAiImKiBgKiCkKiPeDjAlDiClDiCoKiClNjCmKjCgNiBeC_xHqqkZx_
#define WM_USER_REGCOLOR_CHANGED		(WM_USER + 0x2070)
#define WM_USER_REGFONT_CHANGED			(WM_USER + 0x2071)

// _xZkqqHx_jFjEjFgJiCmMjBeJjBpAiPpDjBnEiCkKjFmPiNfIiClDiCoKiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_OBJ_SELECT_CHANGED		(WM_USER + 0x2100)
// _xZkqqHx_iMlLiNnNiCmMiDgDiBfLiDiLiCkKjFmPiNfIiClDiCoKiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_CURRENT_TOOL_CHANGED	(WM_USER + 0x2101)
// CmdSessionEnd_xZkqqHx_iKnGjAjEiCkKiOmAiNhDiClDiCoKiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_CMD_SESSION_ENDED		(WM_USER + 0x2102)

// _xZkqqHx_iDfCiDhNiDjDiDgIiKnGjAjEiCkKiOmAiNhDiClDiCoKiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_COMMAND_CALLED			(WM_USER + 0x2103)

// _xZkqqHx_iDgFiDeMiDfIiDgHiCmMjBeJjBpAjEmNiImNiCkKjFmPiNfIiClDiCoKiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_TEXT_SELECT_CHANGED		(WM_USER + 0x2104)

// _xZkqqHx_jFlGiPjBiCmMiPiJiKpKiJlLiOjOiBeC_xHqqkZx_
#define WM_USER_INIT_CONTENTS			(WM_USER + 0x2105)

//----- 05.04.14 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
////----- WM_USER_COMMAND_CALLED_xZkqqHx_iCmM_xHqqkZx_wParam ------
//#define FDCC_COMMAND_RECORD				0
//#define FDCC_COMMAND_REDO				1
//#define FDCC_COMMAND_UNDO				2
//----- 05.04.14 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

// CFCMultiCtrlTmpl_xZkqqHx_iCmMjFmPiNfIjCmKjCgNiBeC_xHqqkZx_
#define WM_USER_MULTICTRL_CHANGED		(WM_USER + 0x2110)

// _xZkqqHx_iDiMiDeDiDiEiBfLiCkKjFmPiNfIiClDiCoKiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_LAYER_UPDATED			(WM_USER + 0x2105)
// _xZkqqHx_iDfGiBfLiDgHiCkKjFmPiNfIiClDiCoKiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_SHEET_CHANGED			(WM_USER + 0x2106)
// _xZkqqHx_iDeKiDiMiDjDiDgHiDfGiBfLiDgHiCkKjFmPiNfIiClDiCoKiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_CURRENT_SHEET_CHANGED	(WM_USER + 0x2107)

//----- 02.08.28 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ (TrueType_xZkqqHx_iCmFiCmNiCmIiCkCiDhEiDeIiDjDiDgHiCkKiOgHiCoNiCoKiCmEiClFiCnMiCkEiPoKiNiHiCkKiCkAiCoJ_xHqqkZx_)-----
// _xZkqqHx_iDhEiDeIiDjDiDgHiCkKjBlGiNnNiClJiClIiBeBjBoDiCoNiCoIiCmMiDhEiDeIiDjDiDgHiCmJjChFiCkLiKlHiCkGiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_FONT_NOT_FOUND			(WM_USER + 0x2120)
//----- 02.08.28 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ (TrueType_xZkqqHx_iCmFiCmNiCmIiCkCiDhEiDeIiDjDiDgHiCkKiOgHiCoNiCoKiCmEiClFiCnMiCkEiPoKiNiHiCkKiCkAiCoJ_xHqqkZx_)-----
//----- 05.06.27 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
// OLE_xZkqqHx_iDeJiDhFiDfHiDeGiDeOiDgHiCmJiInJiPoNiCkKiCkAiCoJiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_INVALID_OLE_OBJECT		(WM_USER + 0x2121)
//----- 05.06.27 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
// 05.10.12 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//// CFCFldgOpenDdfile_xZkqqHx_iCmJiCkIiCkCiCmEiBeBiDhEiDeAiDeDiDiLjDmHiCnNiNjOiCnNiCkKiPeJjHlJiClFiClNiPoKiNiHiBeC_xHqqkZx_
// FCFdbOpenDdFile_xZkqqHx_iCmJiCkIiCkCiCmEiBeBiDhEiDeAiDeDiDiLjDmHiCnNiNjOiCnNiCkKiPeJjHlJiClFiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_PNG_DATA_LOADED			(WM_USER + 0x2130)

// CFCAsyncNetFile_xZkqqHx_iCmJiCkIiCkCiCmEiBeBiDeDiDjDiDfOiBfLiDgMiDgCiDgHiDgGiBfLiDfOiCkKjDmHiCnNiNjOiCnMiCoKiClNiPoKiNiHiBeC_xHqqkZx_
#define WM_USER_INTERNET_DATA_AVAILABLE	(WM_USER + 0x2140)

// _xZkqqHx_iDhGiDiJiDePiDeDiDjDjHhAiCmMiDfEiDfIiDhJiDjDiDgIiDiBiDgCiDfKiBfLiDfHiBeC_xHqqkZx_
#define WM_USER_SUSPEND					(WM_USER + 0x2200)
// _xZkqqHx_iDhGiDiJiDePiDeDiDjDiDiBiDgKiDiFiBfLiCpAjDgPjIfOiClHiCoJiDiBiDgCiDfKiBfLiDfHiBeC_xHqqkZx_
#define WM_USER_REGISTER_PLUGIN_MENU	(WM_USER + 0x2201)

#define FD_CHIP_BMP_W		64	// _xZkqqHx_iDgAiDgCiDhGiCmMiDhCiDgCiDgHiDhNiDgCiDhGiCmMjFjNiBeC_xHqqkZx_
#define FD_CHIP_BMP_H		64	// _xZkqqHx_iDgAiDgCiDhGiCmMiDhCiDgCiDgHiDhNiDgCiDhGiCmMiNiCiClDiBeC_xHqqkZx_
#define FD_PICT_ARROW_BMP_W	64	// _xZkqqHx_iDeBiDiNiBfLiCmMiDhCiDgCiDgHiDhNiDgCiDhGiCmMjFjNiBeC_xHqqkZx_
#define FD_PICT_ARROW_BMP_H	64	// _xZkqqHx_iDeBiDiNiBfLiCmMiDhCiDgCiDgHiDhNiDgCiDhGiCmMiNiCiClDiBeC_xHqqkZx_
#define FD_DEF_PAGE_W		19800.0		// _xZkqqHx_iDhGiDiKiDjDiDfOjGlDiCmMiPoKiNiHiCmMiDhJiBfLiDfHiDfEiDeDiDfJiPiJiKpKjCgM_xHqqkZx_.
#define FD_DEF_PAGE_H		28500.0		// _xZkqqHx_iDhGiDiKiDjDiDfOjGlDiCmMiPoKiNiHiCmMiDhJiBfLiDfHiDfEiDeDiDfJiPiJiKpKjCgM_xHqqkZx_.
#define FD_SHEET_MARGIN		100.0		// _xZkqqHx_iIpIjApMiCmMiInHiCmMiDhJiBfLiDfHiPoDiJlKiNlGiJeFiCmMjHfNjEjCiBeC_xHqqkZx_
#define FD_SHEET_MIN_X		-10000.0	// _xZkqqHx_iDfGiBfLiDgHiCmMiNlGiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_SHEET_MIN_Y		-10000.0	// _xZkqqHx_iDfGiBfLiDgHiCmMiPoDiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_SHEET_MAX_X		10000.0		// _xZkqqHx_iDfGiBfLiDgHiCmMiJeFiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_SHEET_MAX_Y		10000.0		// _xZkqqHx_iDfGiBfLiDgHiCmMiJlKiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_PAGE_MAX_W		10000.0		// _xZkqqHx_iDhJiBfLiDfHiCmMjFjNiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_PAGE_MAX_H		10000.0		// _xZkqqHx_iDhJiBfLiDfHiCmMiNiCiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_PAPER_MAX_W		5000.0		// _xZkqqHx_jHhAiOiGiCmMjFjNiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_PAPER_MAX_H		5000.0		// _xZkqqHx_jHhAiOiGiCmMiNiCiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_OBJ_MAX_W		10000.0		// _xZkqqHx_jFjEjFgJiCmMjFjNiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_OBJ_MAX_H		10000.0		// _xZkqqHx_jFjEjFgJiCmMiNiCiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_PENWEIGHT_MAX	100.0		// _xZkqqHx_jApMjFjNiCmMiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_WIDEPOLYW_MAX	100.0		// _xZkqqHx_jFjNiNeMjApMjFjNiCmMiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_TEXTMARGIN_X		100.0		// _xZkqqHx_jFjEjFgJjCiGiDgFiDeMiDfIiDgHjHfNjEjCiCmMiNlGiJeFiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_TEXTMARGIN_Y		100.0		// _xZkqqHx_jFjEjFgJjCiGiDgFiDeMiDfIiDgHjHfNjEjCiCmMiPoDiJlKiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_POLY_PULL_X_MAX	1000.0		// _xZkqqHx_iIpIjApMiCmMiNlGiJeFiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_POLY_PULL_Y_MAX	1000.0		// _xZkqqHx_iIpIjApMiCmMiPoDiJlKiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_SHADOWLEN_X_MAX	100.0		// _xZkqqHx_iJgFiCmMiNlGiJeFiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_SHADOWLEN_Y_MAX	100.0		// _xZkqqHx_iJgFiCmMiPoDiJlKiMmAjDhIjCgMiBgJjCgMiCpAiKnMiCnOiBgKiBeCiOmAiNmAjFfHiBeC_xHqqkZx_
#define FD_TEXT_LINE_AFTER_MIN	-100	// _xZkqqHx_iNhDiKnEiBgJiNhDiJlKiBgKiNmFiPkMjCgMiBeCiDhMiDeDiDjDiDgHiNmAjFfHiBeC_xHqqkZx_
#define FD_TEXT_LINE_AFTER_MAX	100		// _xZkqqHx_iNhDiK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IjCgMiBgJjCgMiCpAiKnMiCnOiBgK_xHqqkZx_

#define FD_COPY_RESOLUTION	4.0			// _xZkqqHx_iCfDjEhLiJpAjBjMjDhIiCpAiOhHjCoIiBeC_xHqqkZx_

// 06.12.07 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
#define FD_MIN_AREA_FOR_TEXT	1.0		// _xZkqqHx_iDgFiDeMiDfIiDgHjFnCiPfHiJmCjEfMiCmIjFjEjFgJjGmKjAmPiCmMiNmFiPkMjCgMiBeC_xHqqkZx_

#define FD_COMPRESS_NONE	BYTE(0xff)	// _xZkqqHx_jEpBiIlDiPgLiBeC_xHqqkZx_
#define FD_COMPRESS_LZ77	BYTE(0)		// LZ77_xZkqqHx_iIlDiPgLiBeC_xHqqkZx_

// _xZkqqHx_iDhEiDiMiBfLiDiAiCmMiDfOiDeDiDhNiBfLiPoOjFpBiBeC_xHqqkZx_
// _xZkqqHx_iDfOiDeDiDhNiBfL_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
// _xZkqqHx_iDhEiDiJiDgCiDfGiDiFiDfOiDeDiDhNiBfLiBeC_xHqqkZx_
#define FDTIMER_FRAME_FLUSH					1
// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiNfIjAfGiDgAiDeGiDgCiDeOiDfOiDeDiDhNiBfLiBeC_xHqqkZx_
#define FDTIMER_FRAME_IS_PROJECT_UPDATED	2
// _xZkqqHx_iDgIiDeMiDiFiDiBiDjDiDgHjHhGiLiBiBeC_xHqqkZx_
#define FDTIMER_FRAME_DOC_REQUEST			3
// _xZkqqHx_iOjOiMhGjHhAiOjOiKnEjCmKjCgNiBeC_xHqqkZx_
#define FDTIMER_FRAME_FOR_WATCH				4

// _xZkqqHx_iDhEiDiJiDgCiDfGiDiFiDfOiDeDiDhNiBfLiCmMiDeDiDjDiDfOiBfLiDgPiDiLiBeC_xHqqkZx_
#define FD_INTERVAL_FRAME_FLUSH					5000
// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiBeFjHjKjHpAjFlGiPjBiNfIjAfGiDgAiDeGiDgCiDeOiCmMjBnCiClPiOjOiKnEiBeC_xHqqkZx_
#define FD_INTERVAL_FRAME_IS_PROJECT_UPDATED	3000
// _xZkqqHx_iDgIiDeMiDiFiDiBiDjDiDgHjHhGiLiBiCmMjBnCiClPiOjOiKnEiBeC_xHqqkZx_
#define FD_INTERVAL_FRAME_DOC_REQUEST			100
// _xZkqqHx_iOjOiMhGjHhAiOjOiKnEjCmKjCgNiCmMiDeDiDjDiDfOiBfLiDgPiDiLiBeC_xHqqkZx_10_xZkqqHx_jFgCiBeC_xHqqkZx_
#define FD_INTERVAL_FRAME_FOR_WATCH				10000

#define FD_COLREF_WHITE			RGB(0xff, 0xff, 0xff)
#define FD_COLREF_BLACK			RGB(0, 0, 0)
#define FD_COLREF_RED			RGB(0xff, 0, 0)
#define FD_COLREF_GREEN			RGB(0, 0x80, 0)
#define FD_COLREF_BLUE			RGB(0, 0, 0xff)
#define FD_COLREF_GRAY			RGB(0x80, 0x80, 0x80)
#define FD_COLREF_DARK_GRAY		RGB(0xa9, 0xa9, 0xa9)
#define FD_COLREF_ORANGE		RGB(0xff, 0xa5, 0x00)
#define FD_COLREF_MIDNIGHT_BLUE	RGB(0x19, 0x19, 0x70)
#define FD_COLREF_DIM_GRAY		RGB(0x69, 0x69, 0x69)
#define FD_COLREF_SILVER		RGB(0xc0, 0xc0, 0xc0)
#define FD_COLREF_GAINS_BORO	RGB(0xdc, 0xdc, 0xdc)
#define FD_COLREF_SKY_BLUE_A	RGB(0xaf, 0xff, 0xff)
#define FD_COLREF_PALE_GREEN	RGB(0x98, 0xfb, 0x98)
#define FD_COLREF_LIGHT_GRAY	RGB(0xe8, 0xe8, 0xe8)

///////////////////////////////////////////////////////////////////////////////
//
// _xZkqqHx_iKgHjCkDiDiBiDfOiDhEiDeAiDeDiDiLiCpA_xHqqkZx_WORD2000_xZkqqHx_iCmJjDfMiCoIjFhEiCkPiClNiPoKiNiHiBeBiDgGiDeCiDfIiDhGiDiMiDeDiCmM_xHqqkZx_PPM_xZkqqHx_iCmFjFoCjAlDiClDiCoKiCoJiCkKiBeB_xHqqkZx_
// _xZkqqHx_iClLiCmM_xHqqkZx_PPM_xZkqqHx_iCkK_xHqqkZx_ HORZRES,HORZSIZE _xZkqqHx_iCpAiMlDiCmJiClHiCoJiCkJiBeB_xHqqkZx_LOGPIXELSX _xZkqqHx_iCpAiMlDiCmJiClHiCoJiCkJiCmM_xHqqkZx_
// _xZkqqHx_iDfIiDiMiDgCiDfGiDiFiDeJiBfLiDiLiDgIiBeCjAiEjBkKjCgMiBeC_xHqqkZx_
// SrvrItem.cpp_xZkqqHx_iCmM_xHqqkZx_EnumEnhMetafileProc_xZkqqHx_iCmMiJpAjAoAiCpAiOfBiPmGiBeC_xHqqkZx_
//
// WORD2000_xZkqqHx_iCkKiBeB_xHqqkZx_LOGPIXELSX _xZkqqHx_iCpAiMlDiCmJjFoCjAlDiClHiCoJiPoKiNiHiBeC_xHqqkZx_
// _xZkqqHx_iBhJiKgHjCkDiDiBiDfOiDhEiDeAiDeDiDiLiCmMiDhHiDgCiDfPiPoOjFpBiBhK_xHqqkZx_
// HORZRES_xZkqqHx_iDhIiBfLiDfIiCmM_xHqqkZx_PPM	7.8554595443833464257659073055774
// _xZkqqHx_iBhJiDeBiDhGiDiKjCiGiCmMiPoOjFpBiBhK_xHqqkZx_
// g_->dDisplayPPM		4.7244094488189
// _xZkqqHx_iBhJ_xHqqkZx_PPM_xZkqqHx_iCmMjEoEjHkGiBhK_xHqqkZx_
// 1.6627389368944741620843152657768
//
// WORD2000_xZkqqHx_iCkKiBeB_xHqqkZx_HORZRES,HORZSIZE _xZkqqHx_iCpAiMlDiCmJjFoCjAlDiClHiCoJiPoKiNiHiBeC_xHqqkZx_
// _xZkqqHx_iBhJiKgHjCkDiDiBiDfOiDhEiDeAiDeDiDiLiCmMiDhHiDgCiDfPiPoOjFpBiBhK_xHqqkZx_
// HORZRES_xZkqqHx_iDhIiBfLiDfIiCmM_xHqqkZx_PPM	7.8492935635792778649921507064364
// _xZkqqHx_iBhJiDeBiDhGiDiKjCiGiCmMiPoOjFpBiBhK_xHqqkZx_
// g_->dDisplayPPM		4.7244094488189
// _xZkqqHx_iBhJ_xHqqkZx_PPM_xZkqqHx_iCmMjEoEjHkGiBhK_xHqqkZx_
// 1.6614338042909463173731030873892
//
// _xZkqqHx_iImIiPoDiCmMiOmAiMlBiCmNiBeBiCfBiCmCiCmMiJoGjGmKiCmMiJpAjBjMjDhIiCmFiOmAiMlBiClFiCmEiCkCiCoJiBeC_xHqqkZx_
// _xZkqqHx_iClBiCmMiCfBiCmCiCmMiPoKiNiHiBeBiKgHjCkDiDiBiDfOiDhEiDeAiDeDiDiLiDhHiDgCiDfPjCiGiCmM_xHqqkZx_HORZRES_xZkqqHx_iDhIiBfLiDfIiCmM_xHqqkZx_PPM
// _xZkqqHx_iCmNjDkPiClGiCmJjAnNjCoIiClFiClNiBeC_xHqqkZx_
// _xZkqqHx_iDgGiDeCiDfIiDhGiDiMiDeDiCmMjFnEiClH_xHqqkZx_HORZRES_xZkqqHx_iDhIiBfLiDfIiCmM_xHqqkZx_PPM_xZkqqHx_iCmNiInJiCmBiCmEiCkCiClNiBeC_xHqqkZx_
// _xZkqqHx_iCnMiClNiBeB_xHqqkZx_g_->dDisplayPPM _xZkqqHx_iCmNiBeBjDkPiClGjCgMiCmFiCkAiCmBiClNiBeC_xHqqkZx_
// _xZkqqHx_iPoDiLeMiCmM_xHqqkZx_PPM_xZkqqHx_iCmMjEoEjHkGiCmMoIiHjCgMiCmNiBeBiCfBiCmCiCmMiDfAiBfLiDfIiCmFjDkPiClGiCmFiCkAiCmBiClNiBeC_xHqqkZx_
// g_->dDisplayPPM _xZkqqHx_iCmG_xHqqkZx_ HORZRES_xZkqqHx_iDhIiBfLiDfIiCmM_xHqqkZx_PPM _xZkqqHx_iCmMjEoEjHkGiCkKoIiHjCgMiCmFiCkAiCoJiCmG_xHqqkZx_
// _xZkqqHx_iJlMjCoIiClFiCmEiCkCiCoJiCkKiBeBiCfBiCmCiCmMiDfAiBfLiDfIiCmFiCmN_xHqqkZx_ g_->dDisplayPPM _xZkqqHx_iCkKjDkPiClGjCgMiCmF_xHqqkZx_
// _xZkqqHx_iCkAiCoJiClNiCnPiBeBiCoAiClFiCkJiClFiClNiCoHiBeB_xHqqkZx_HORZRES_xZkqqHx_iDhIiBfLiDfIiCmM_xHqqkZx_PPM _xZkqqHx_jCfAjDmGiCmMjCgMiCkK_xHqqkZx_
// _xZkqqHx_oIiHjCgMiCmFiCkAiCoJiClBiCmGiCoAiNgMiCkGiCoHiCoKiCoJiBeC_xHqqkZx_
// _xZkqqHx_iClOiCkKiBeBiCmGiCoIiCkAiCkGiClIiCmNiBeBiDfIiDiMiDgCiDfGiDiFiDeJiBfLiDiLiDgIiCmNiImIiJlKiCmJiClHiCoJiBeC_xHqqkZx_
//
//#define FD_MSWORD_EMF_PPM_RATIO	1.662	// PPM_xZkqqHx_jEoEjHkGiCkKiClBiCmMjCgMiImIiPoDiCmIiCoHiCmOiBeB_xHqqkZx_LOGPIXELSX_xZkqqHx_iDhIiBfLiDfIiBeC_xHqqkZx_
//
// _xZkqqHx_iCmGiClBiCoLiCkKiBeBiJoEiCkKiJmGiCmMiKmCiLkLiCmGiDgIiDiJiDfDiDjDiClDiCpBiCmMiKmCiLkLiCmFiCmNiBeBiClBiCmMjCgMiCkKiIoBiCkEiCoHiClFiCkCiBeC_xHqqkZx_
// WORD2000_xZkqqHx_iCmGiBeBiCfAjEhLiBeBiCfBjEhLiCmFiCmMiDgGiBfLiDfOiCmMiMpAiKlHiCmNiCkAiCkLiCoHiCnPiCmEiBeBiCfDjEhLiImIiPoDiCmFiOgHiCkEiClBiCmGiCpAiOpMjCgNiBeC_xHqqkZx_
//
///////////////////////////////////////////////////////////////////////////////

#define FD_TERMINAL_DISTANCE	4.0		// _xZkqqHx_jCfLjDfPiCkJiCo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define FD_UNIT_CFFCNT_MM		double(1.0)		// mm.
#define FD_UNIT_CFFCNT_INCH		double(25.4)	// inch.
#define FD_UNIT_CFFCNT_POINT	double(0.35277777777777777777777777777778)	// _xZkqqHx_iDhMiDeDiDjDiDgH_xHqqkZx_.
#define FD_UNIT_CFFCNT_SUN		double(30.3)	// _xZkqqHx_jAkB_xHqqkZx_.

#define FD_MAX_PROJECT_DIR_PATH	(_MAX_PATH - 60)	// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiCmMiDgGiDeCiDiMiDeOiDgHiDiKjGlMiNmFjBoFjCgMiBeC_xHqqkZx_
#define FD_MAX_HISTDOC_NAME		34					// _xZkqqHx_jHjKjHpAiDhEiDeAiDeDiDiLjGlMiCmMiDgPiBfLiDfHiDiHiDjDiCpAiPjMiCkNjFjEjFkKiBeC_xHqqkZx_
#define FD_MAX_HISTDOC_VERSION	10					// _xZkqqHx_jHjKjHpAiDhEiDeAiDeDiDiLjGlMiCmMiDgPiBfLiDfHiDiHiDjDjFjEjFkKiBeC_xHqqkZx_
#define FD_MAX_HISTORIC_FILE (_MAX_PATH - 6)		// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiKnGjIeBiDhEiDeAiDeDiDiLjGlMiNmFjBoFjCgMiBeC_xHqqkZx_

#define FD_RULER_MMK_MAX	2		// _xZkqqHx_iDiLiBfLiDiJiBfLiCmJjFfMiOkGiClDiCoKiCoJiDhNiDeFiDfIiImKjChFiDiLiBfLiDiJiBfLiDhNiDeFiDfIiDhNiBfLiDeKiBfLiCmMiNmFjBoFjAjEiBeC_xHqqkZx_

#define FD_ZOOM256_MAX	32768	// Zoom256_xZkqqHx_jCgMiCmMiNmFjBoFjCgMiBeCiClBiCmMjCgMiCpAiKnMiCnOiBeC_xHqqkZx_
#define FD_ZOOM256_MIN	1		// Zoom256_xZkqqHx_jCgMiCmMiNmFiPkMjCgMiBeCiClBiCmMjCgMiCpAiKnMiCnOiBeC_xHqqkZx_

// _xZkqqHx_iDeBiDhGiDiKiDiCiBfLiDgIiBeC_xHqqkZx_RegData.cpp_xZkqqHx_iCmMiKmCiLkLjAnNjCoIjHhAjFmPjAjEiCmFiBeBjFkBjAjEiDiCiBfLiDgIiCpA_xHqqkZx_
// _xZkqqHx_iPgEjFkBiClDiClJiCoJiClNiCnPiBeBjCgMiCmJiCmNiDhCiDgCiDgHjCfAiImKiCmFiCfAiCpAjAnNjCoIiClHiCoJiBeC_xHqqkZx_
#define FD_APPMODE_DYNAMICDRAW		WORD(0x0100 << 0)	// DynamicDraw_xZkqqHx_iDiCiBfLiDgIiBeC_xHqqkZx_
#define FD_APPMODE_CHIPEDITOR		WORD(0x0100 << 1)	// _xZkqqHx_iDgAiDgCiDhGiDeHiDgGiDeCiDfOiDiCiBfLiDgIiBeC_xHqqkZx_
#define FD_APPMODE_ARROWEDITOR		WORD(0x0100 << 2)	// _xZkqqHx_iDeBiDiNiBfLiDeHiDgGiDeCiDfOiDiCiBfLiDgIiBeC_xHqqkZx_
#define FD_APPMODE_HISTORYVIEWER	WORD(0x0100 << 3)	// _xZkqqHx_jHjKjHpAiDhCiDiFiBfLiDeBiDiCiBfLiDgIiBeC_xHqqkZx_
#define FD_APPMODE_HISTORICDRAW		WORD(0x0100 << 4)	// HistoricDraw_xZkqqHx_iDiCiBfLiDgIiBeC_xHqqkZx_
#define FD_APPMODE_ALL	(FD_APPMODE_DYNAMICDRAW|FD_APPMODE_CHIPEDITOR|FD_APPMODE_ARROWEDITOR|FD_APPMODE_HISTORYVIEWER|FD_APPMODE_HISTORICDRAW)

// _xZkqqHx_iPgEjFkBiCmFiCkLiCmIiCkCiCmGiBeB_xHqqkZx_Molip_xZkqqHx_iCpA_xHqqkZx_OLE_xZkqqHx_iCmGiClFiCmEiDhJiBfLiDfIiDgHiClFiClNjAoGiCmMiDeBiDhGiDiKiCkJiCoHiBeB_xHqqkZx_Molip_xZkqqHx_iNmEjFnCiPfHiCkKiCmFiCkLiCmIiCkNiCmIiCmBiCmEiClFiCnMiCkEiBeC_xHqqkZx_
// _xZkqqHx_iOmAiNhDiDiCiBfLiDgIiBeCiPgEjFkBiClDiClJiCoJiPoKiNiHiCkKiCkAiCoJiCmMiCmFiBeBiDhCiDgCiDgHiClCiCmGiCmJjAnNjCoIiBeC_xHqqkZx_
#define FD_RUNMODE_NONE				WORD(0x0000)		// _xZkqqHx_iOmAiNhDiDiCiBfLiDgIjGlDiClFiBeC_xHqqkZx_
// 03.09.23 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//#define FD_RUNMODE_USER_TEMPLATE	WORD(0x0001 << 0)	// _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHjDpMjHmNiDiCiBfLiDgIiBeC_xHqqkZx_
#define FD_RUNMODE_REPAIR_DOCUMENT	WORD(0x0001 << 1)	// _xZkqqHx_jFlGiPjBiPeDjFjMiDiCiBfLiDgIiBeC_xHqqkZx_
// 03.09.23 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//#define FD_RUNMODE_SAVE_DOCUMENT	WORD(0x0001 << 2)	// _xZkqqHx_jFlGiPjBjFnLjBlGiDiCiBfLiDgIiBeC_xHqqkZx_
// 03.09.23 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
//#define FD_RUNMODE_SPEC_TEMPLATE	WORD(0x0001 << 3)	// _xZkqqHx_iDgFiDjDiDhGiDiMiBfLiDgHiOhHjCoIiDiCiBfLiDgIiBeC_xHqqkZx_
#define FD_RUNMODE_EMBEDDED			WORD(0x0001 << 4)	// OLE Embedded_xZkqqHx_iDiCiBfLiDgIiBeC_xHqqkZx_
// 02.05.30 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ (Molip_xZkqqHx_iCpA_xHqqkZx_OLE_xZkqqHx_iCmGiClFiCmEiDhJiBfLiDfIiDgHiClFiClNjAoGiCmMiDeBiDhGiDiKiCkJiCoHiBeB_xHqqkZx_Molip_xZkqqHx_iNmEjFnCiPfHiCkKiCmFiCkLiCmIiCkNiCmIiCmBiCmEiClFiCnMiCkEiBeC_xHqqkZx_)
#define FD_RUNMODE_ON_EXIT			WORD(0x0001 << 7)	// _xZkqqHx_iDeBiDhGiDiKiPeJjHlJiPiIjHjNjCiGiBeC_xHqqkZx_

#define FD_APPMODE_MASK WORD(0xff00)
#define FD_RUNMODE_MASK WORD(0x00ff)

#define FD_SHEET_UNSPECIFY	SheetID(-1)

// flint_xZkqqHx_iMfOiCmMiNmFjBoFjCgMiBeBiNmFiPkMjCgMiBeC_xHqqkZx_
#define FLINT_MIN	_I64_MIN
#define FLINT_MAX	_I64_MAX

// _xZkqqHx_iOmAiNmAjFfHiBeC_xHqqkZx_
typedef double	mmetol;
// _xZkqqHx_iOmAiNmAjFfHiBeC_xHqqkZx_
typedef float	fmmetol;
// HIX_xZkqqHx_iNmAjFfHiBeC_xHqqkZx_
typedef __int64 hixc;
// HI_xZkqqHx_iNmAjFfHiBeC_xHqqkZx_
typedef double hic;
// tms_xZkqqHx_jCgMiBgJiCfDiMiFiMmFjCoIiPkMjAjEjDfPiBgK_xHqqkZx_
typedef double tmsc;
// xtm_xZkqqHx_jCgMiBgJ_xHqqkZx_tms_xZkqqHx_iCmMiCfDiMiFiPoDiClAjAkOjAjEiBgK_xHqqkZx_
typedef __int64 xtmc;

// _xZkqqHx_jHjKjHpAiDhEiDeAiDeDiDiLiCmMiImKjChFiLeMjIfOjHhAiBeC_xHqqkZx_
typedef __int64 flint;

// double_xZkqqHx_iMfOiCmMiDhMiDeDiDjDiDgHiNmAjFfHiBeC_xHqqkZx_
typedef double	dblpnt;

// double_xZkqqHx_iMfOiCmMiKhAjDhIiBeCjCmKiPoNiCmN_xHqqkZx_[0.0, 2.0)_xZkqqHx_iBeC_xHqqkZx_
typedef double	angle;


// FDTIME_xZkqqHx_iMfOiBeGjAkCiKeFjFfHiPiAiOjO_xHqqkZx_(_xZkqqHx_iBoAiDePiDiKiDgKiDg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kZx_
#define FDSECTIME_MIN	FDSECTIME(0)
#define FDSECTIME_MAX	FDSECTIME(-1)

typedef WORD		SColorID;
typedef WORD		PatternID;
typedef WORD		EmfImageID;
typedef WORD		PenStyleID;
typedef SColorID	PenRegisterID;
typedef SColorID	BrushRegisterID;
typedef WORD		SFontID;
typedef COLORREF	ColorRefID;
typedef DWORD		ChipGroupID;
typedef DWORD		ChipID;
typedef DWORD		SheetID;
typedef WORD		PictArrowID;

//----- 03.11.22 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//// _xZkqqHx_iDeOiDiJiDfIiDfOiDeDiDhGiBeC_xHqqkZx_
//typedef void*		FDCtype;
//----- 03.11.22 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_jHpBiLjD_xHqqkZx_>	FTObjectType
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJiOoNiCmM_xHqqkZx_ID_xZkqqHx_iBeCiDhEiDeAiDeDiDiLiCmJiLeMjIfOiClDiCoKiCoJiCmMiCmFiPiHjEnEiCpAiLlGiCoNiClJiCmEiCmNiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
 *************************************************************************/
enum FTObjectType
{
	FDOJ_NONE = 0,
	FDOJ_OBJECT,		// _xZkqqHx_jEhKjChFjFjEjFgJiBeC_xHqqkZx_
	FDOJ_FIGURE,		// _xZkqqHx_iKoOjGhLjAhNiMgAjFjEjFgJiBeC_xHqqkZx_
	FDOJ_LINE,			// _xZkqqHx_jApMjFjEjFgJiBeC_xHqqkZx_
	FDOJ_RECT,			// _xZkqqHx_iLoJiMgAjFjEjFgJiBeC_xHqqkZx_
	FDOJ_ROUND_RECT,	// _xZkqqHx_iKnLiKhAiLoJiMgAjFjEjFgJiBeC_xHqqkZx_
	FDOJ_ARC,			// _xZkqqHx_iJhOiMmKjFjEjFgJiBeC_xHqqkZx_
	FDOJ_POLY,			// _xZkqqHx_jBlNiKhAjApMjFjEjFgJiBeC_xHqqkZx_
	FDOJ_GROUP,			// _xZkqqHx_iDePiDiLiBfLiDhGjFjEjFgJiBeC_xHqqkZx_
	FDOJ_WIDE_POLY,		// _xZkqqHx_jFjNiNeMjBlNiKhAjApMjFjEjFgJiBeC_xHqqkZx_
	FDOJ_OLE,			// OLE_xZkqqHx_jFjEjFgJiBeC_xHqqkZx_
	FDOJ_CHIP_MASTER,	// _xZkqqHx_iDhNiDfIiDfOiBfLiDgAiDgCiDhGjFjEjFgJiBeC_xHqqkZx_
	FDOJ_POINT,			// _xZkqqHx_iDiKiDjDiDeOjDfPjFjEjFgJiBeC_xHqqkZx_
	FDOJ_PICT_ARROW,	// _xZkqqHx_iDhDiDeOiDgAiDiDjGoOiIpDjFjEjFgJiBeC_xHqqkZx_
	FDOJ_LABEL,			// _xZkqqHx_iDiJiDhIiDiLjFjEjFgJiBeC_xHqqkZx_
	FDOJ_TABLE,			// _xZkqqHx_jFfMjFjEjFgJiBeC_xHqqkZx_
	FDOJ_TEXT_RECT,		// _xZkqqHx_iDgFiDeMiDfIiDgHiLoJiMgAjFjEjFgJiBeC_xHqqkZx_
}; // enum FTObjectType.

/*************************************************************************
 * <_xZkqqHx_jHpBiLjD_xHqqkZx_>	FTYnc
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFmPjAjEiCkKiCfCjCgMiBgJiChIiCgEiChCiBeBiCgNiCgOiBeBiCgDiCgEiCgFiCgAiChEiCgLiChDiBgKiCpAiCmGiCoJiPoKiNiHiCmJiOgHjHhAiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.10.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
enum FTYnc
{
	FD_NO		= 0,
	FD_YES		= 1,
	FD_DEFAULT	= 0xff,
	FD_CANCEL	= 0xff,
	FD_NONE		= 0xff,
}; // enum FTYnc.

//----- 06.04.22 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_jHpBiLjD_xHqqkZx_>	FTIsShowErrorMessageBox
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iKgFiKnGjAjEiCmFiBeBiDeHiDiJiBfLiOjOiCmJiBeBjDoAjFjEiCmFiDiBiDgCiDfKiBfLiDfHiDhLiDgCiDeOiDfIiCpAjFfMiOkGiClHiCoJiCkJ_xHqqkZx_
// *			_xZkqqHx_iCmHiCkEiCkJiCpAiOhHjCoIiClHiCoJiClNiCnPiCmMjHpBiLjDiOhBiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	02.12.13 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//enum FTIsShowErrorMessageBox
//{
//	FD_ERRBOX_NOT_SHOW = 0,	// _xZkqqHx_iDeHiDiJiBfLiOjOiCmJiDiBiDgCiDfKiBfLiDfHiDhLiDgCiDeOiDfIiCpAjFfMiOkGiClFiCmIiCkCiBeC_xHqqkZx_
//	FD_ERRBOX_SHOW,			// _xZkqqHx_iDeHiDiJiBfLiOjOiCmJiDiBiDgCiDfKiBfLiDfHiDhLiDgCiDeOiDfIiCpAjFfMiOkGiClHiCoJiBeC_xHqqkZx_
//}; // enum FTIsShowErrorMessageBox.
//----- 06.04.22 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/*************************************************************************
 * <_xZkqqHx_jHpBiLjD_xHqqkZx_>	FTDocumentFormat
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFlGiPjBiCmMiDhEiDeIiBfLiDhNiDgCiDgHiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.04.20 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
enum F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gJiClBiCmM_xHqqkZx_ID_xZkqqHx_iImIiNhOiBgK_xHqqkZx_
}; // enum FTDocumentFormat.

// _xZkqqHx_jFlGiPjBiDhGiDiNiDhAiDgFiDeCiCmM_xHqqkZx_ID_xZkqqHx_iBeCiPiHiPjIiCpAiLlGiCoNiClJiCmEiCmNiCmIiCoHiCmIiCkCiBeC_xHqqkZx_
enum FTDocumentPropertyId
{
	FD_DPID_NONE = -1,				// _xZkqqHx_jGlDiMpI_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
	FD_DPID_DOCUMENT_TITLE = 0,		// _xZkqqHx_jFlGiPjBiDfOiDeDiDgHiDiLiBeC_xHqqkZx_
	FD_DPID_DOCUMENT_AUTHOR,		// _xZkqqHx_jFlGiPjBiNoMiOnCiBeC_xHqqkZx_
	FD_DPID_DOCUMENT_DESCRIPTION,	// _xZkqqHx_jFlGiPjBjAoAjGlOiBeC_xHqqkZx_
	FD_DPID_DOCUMENT_COMMENT,		// _xZkqqHx_jFlGiPjBiDfCiDiBiDjDiDgHiBeC_xHqqkZx_
	FD_DPID_END,					// _xZkqqHx_jFlGiPjBiDhGiDiNiDhAiDgFiDeC_xHqqkZx_ID_xZkqqHx_iCmMiPeJjCfLiBeC_xHqqkZx_
}; // enum FTDocumentPropertyId.

/*************************************************************************
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJjBeJjBpAiOjOiCmMiDgOiDjDiDgIiDiLiBeC_xHqqkZx_HitTest_xZkqqHx_iKnGjAjEjDjJiCmFiOgHjHhAiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.04.27 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
enum
{
	FD_RPT_NONE			= 0x0000L,
	FD_RPT_V_TOP		= 0x0001L,
	FD_RPT_V_BOTTOM		= 0x0002L,
	FD_RPT_V_CENTER		= 0x0004L,
	FD_RPT_H_LEFT		= 0x0010L,
	FD_RPT_H_RIGHT		= 0x0020L,
	FD_RPT_H_CENTER		= 0x0040L,
	// _xZkqqHx_iDhNiDfIiDeOiBeC_xHqqkZx_
	FD_RPT_V_MASK		= 0x000fL,
	FD_RPT_H_MASK		= 0x00f0L,
};

enum
{
	FD_HIT_NONE			= FD_RPT_NONE,
	FD_HIT_UPPER_LEFT	= FD_RPT_V_TOP | FD_RPT_H_LEFT,
	FD_HIT_UPPER		= FD_RPT_V_TOP | FD_RPT_H_CENTER,
	FD_HIT_UPPER_RIGHT	= FD_RPT_V_TOP | FD_RPT_H_RIGHT,
	FD_HIT_LEFT			= FD_RPT_V_CENTER | FD_RPT_H_LEFT,
	FD_HIT_CENTER		= FD_RPT_V_CENTER | FD_RPT_H_CENTER,
	FD_HIT_RIGHT		= FD_RPT_V_CENTER | FD_RPT_H_RIGHT,
	FD_HIT_BOTTOM_LEFT	= FD_RPT_V_BOTTOM | FD_RPT_H_LEFT,
	FD_HIT_BOTTOM		= FD_RPT_V_BOTTOM | FD_RPT_H_CENTER,
	FD_HIT_BOTTOM_RIGHT	= FD_RPT_V_BOTTOM | FD_RPT_H_RIGHT,
};

/*************************************************************************
 * <_xZkqqHx_jHpBiLjD_xHqqkZx_>	FTDrawWhich
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFgAiJoGiDiCiBfLiDgIiCpAiOhHjCoIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.05.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
enum FTDrawWhich
{
	FDDR_NONE = 0,			// _xZkqqHx_jCmKiPoNjFgAiJoGiDiCiBfLiDgIiBeC_xHqqkZx_
	FDDR_DISPLAY,			// _xZkqqHx_iDgGiDeCiDfIiDhGiDiMiDeDjFgAiJoGiDiCiBfLiDgIiBeC_xHqqkZx_
	FDDR_PRINTER,			// _xZkqqHx_iDhGiDiKiDjDiDfOjFgAiJoGiDiCiBfLiDgIiBeC_xHqqkZx_
	FDDR_METAFILE,			// _xZkqqHx_iDiBiDfOiDhEiDeAiDeDiDiLjFgAiJoGiDiCiBfLiDgIiBeC_xHqqkZx_
	FDDR_ENHANCED_METAFILE,	// _xZkqqHx_iKgHjCkDiDiBiDfOiDhEiDeAiDeDiDiLjFgAiJoGiDiCiBfLiDgIiBeC_xHqqkZx_
	FDDR_PRINT_PREVIEW,		// _xZkqqHx_iIpDiNpMiDhGiDiMiDhCiDiFiBfLiDiCiBfLiDgIiBeCjCeBiClF_xHqqkZx_OnPrint_xZkqqHx_iOjOiCmN_xHqqkZx_FDDR_PRINTER_xZkqqHx_iBeC_xHqqkZx_
}; // enum FTDrawWhich.


//;------ </EXPORT TO SDK> -----;

/**********************************************************************
 *                   _xZkqqHx_iDeOiDiJiDfIjAoJiMlOjDjJ_xHqqkZx_
 **********************************************************************/

struct FCNoValue
{
}; // class FCNoValue.

// 03.08.05 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//extern FCNoValue NoValue;
#define NoValue (FCNoValue())

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	FCVar
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jCgMjGlDiClF_xHqqkZx_(NoValue)_xZkqqHx_iPpDjBnEiCpAiOjNiCmCjFmPjAjEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.08.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
template<class T> class FCVar
{
public:
	FCVar () :m_bIsNoValue(TRUE), m_tVar(T(NULL)) {}
	FCVar (const FCNoValue&) :m_bIsNoValue(TRUE), m_tVar(T(NULL)) {}
	FCVar (const T& value) :m_bIsNoValue(FALSE), m_tVar(value) {}
	operator T () const { return m_tVar; }
	void operator = (const T& value) { m_bIsNoValue = FALSE; m_tVar = value; }
	void operator = (T value) { m_bIsNoValue = FALSE; m_tVar = value; }
	void operator = (const FCNoValue&) { m_bIsNoValue = TRUE; }
	BOOL operator == (const T& value) const { if (m_bIsNoValue) return FALSE; return m_tVar == value; }
	BOOL operator != (const T& value) const { if (m_bIsNoValue) return TRUE; return m_tVar != value; }
	BOOL operator == (const FCNoValue&) const { return m_bIsNoValue; }
	BOOL operator != (const FCNoValue&) const { return !m_bIsNoValue; }
	const T& Get () const { return m_tVar; }
protected:
	T		m_tVar;
	BOOL	m_bIsNoValue;
}; // class FCVar.

// _xZkqqHx_iDfPiDeDiDeBiDiNiDePiBeBiDhGiDiNiDhAiDgFiDeCiDfGiBfLiDgHjDjJiCmJiOgHjHhAiClHiCoJiDhGiDiNiDhAiDgFiDeCjFmPjAjEiBeC_xHqqkZx_
template<class T> class FCPrpAttr
{
public:
	FCPrpAttr () : m_bIsNoValue(TRUE), m_bIsNoValue_B(TRUE) {}
	void	Init ()
					{
						m_tVar_B = m_tVar;
						m_bIsNoValue_B = m_bIsNoValue;
					}
	void	Init (T value)
					{
						m_tVar = m_tVar_B = value;
						m_bIsNoValue = m_bIsNoValue_B = FALSE;
					}
	void	Init (const FCNoValue&)
					{
						m_bIsNoValue = m_bIsNoValue_B = TRUE;
					}
	void	Backup ()
					{
						m_tVar_B = m_tVar;
						m_bIsNoValue_B = m_bIsNoValue;
					}
	operator T() const
					{
						return m_tVar;
					}
	BOOL operator == (const FCNoValue&) const
					{
						return m_bIsNoValue;
					} // operator ==.
	BOOL operator == (const T& val) const
					{
						if (m_bIsNoValue) return FALSE;
						return m_tVar == val;
					} // operator ==.
	BOOL operator != (const FCNoValue&) const
					{
						return !m_bIsNoValue;
					} // operator ==.
	BOOL operator != (const T& val) const
					{
						if (m_bIsNoValue) return TRUE;
						return m_tVar != val;
					} // operator !=.
	void operator = (const FCNoValue&)
					{
						m_bIsNoValue = TRUE;
					}
	void operator = (const T& value)
					{
						m_tVar = value;
						m_bIsNoValue = FALSE;
					}
	BOOL	IsChanged () const
					{
						if (m_bIsNoValue && m_bIsNoValue_B) return FALSE;
						if (m_bIsNoValue != m_bIsNoValue_B) return TRUE;
						return m_tVar != m_tVar_B;
					}
	T& GetValue ()
					{
						return m_tVar;
					}
	const T& Get () const
					{
						return m_tVar;
					}
	const T& GetBackup () const
					{
						return m_tVar_B;
					}
	BOOL	IsBackupNoValue () const
					{
						return m_bIsNoValue_B;
					}
private:
	T		m_tVar;
	BOOL	m_bIsNoValue;
	T		m_tVar_B;
	BOOL	m_bIsNoValue_B;
}; // class FCPrpAttr.

template<class T>
BOOL operator == (const T& val1, const FCPrpAttr<T>& val2)
{
	return val2 == val1;
} // operator ==.

template<class T>
BOOL operator != (const T& val1, const FCPrpAttr<T>& val2)
{
	return val2 != val1;
} // operator !=.

// _xZkqqHx_jFmPjAjEiCmMiOkJjDkOiDgPiDgCiDeOiDeBiDgCiDhGiBeC_xHqqkZx_
template<class T> class FCAutoBackup
{
public:
	FCAutoBackup (T& ver)
		{
			m_ver = &ver;
			m_backup = ver;
		}
	FCAutoBackup (T& ver, const T& newVal)
		{
			m_ver = &ver;
			m_backup = ver;
			*m_ver = newVal;
		}
	~FCAutoBackup ()
		{
			*m_ver = m_backup;
		}
	void operator = (const T& newVal)
		{
			*m_ver = newVal;
		}
private:
	T*	m_ver;
	T	m_backup;
}; // template<class T> class FCAutoBackup.

//;------ <EXPORT TO SDK> -----;

/*************************************************************************
 * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FC2Fold
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	pair_xZkqqHx_iCmGjDkPiClGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.01.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
template<class T1, class T2> struct FC2Fold
{
	FC2Fold () : first(T1()), second(T2()) {}
	FC2Fold (const T1& v1, const T2& v2)
		: first(v1), second(v2) {}

	T1 first;
	T2 second;
}; // template<class T1, class T2> struct FC2Fold.

template<class T1, class T2>
inline bool operator == (const FC2Fold<T1, T2>& x,
						 const FC2Fold<T1, T2>& y)
{
	return (x.first == y.first &&
			x.second == y.second);
}

template<class T1, class T2>
inline bool operator != (const FC2Fold<T1, T2>& x,
						 const FC2Fold<T1, T2>& y)
{
	return (!(x == y));
}

template<class T1, class T2>
inline bool operator < (const FC2Fold<T1, T2>& x,
						const FC2Fold<T1, T2>& y)
{
	if (x.first < y.first) return true;
	if (x.first > y.first) return false;
	return (x.second < y.second);
}

template<class T1, class T2>
inline bool operator > (const FC2Fold<T1, T2>& x,
						const FC2Fold<T1, T2>& y)
{
	return (y < x);
}

template<class T1, class T2>
inline bool operator <= (const FC2Fold<T1, T2>& x,
						 const FC2Fold<T1, T2>& y)
{
	return (!(y < x));
}

template<class T1, class T2>
inline bool operator >= (const FC2Fold<T1, T2>& x,
						 const FC2Fold<T1, T2>& y)
{
	return (!(x < y));
}

/*************************************************************************
 * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FC3Fold
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	pair _xZkqqHx_iCmM_xHqqkZx_3_xZkqqHx_iCmCjEmFiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.06.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
template<class T1, class T2, class T3> struct FC3Fold
{
	FC3Fold () : first(T1()), second(T2()), third(T3()) {}
	FC3Fold (const T1& v1, const T2& v2, const T3& v3)
		: first(v1), second(v2), third(v3) {}

	T1 first;
	T2 second;
	T3 third;
}; // template<class T1, class T2, class T3> struct FC3Fold.

template<class T1, class T2, class T3>
inline bool operator == (const FC3Fold<T1, T2, T3>& x,
						 const FC3Fold<T1, T2, T3>& y)
{
	return (x.first == y.first &&
			x.second == y.second &&
			x.third == y.third);
}

template<class T1, class T2, class T3>
inline bool operator != (const FC3Fold<T1, T2, T3>& x,
						 const FC3Fold<T1, T2, T3>& y)
{
	return (!(x == y));
}

template<class T1, class T2, class T3>
inline bool operator < (const FC3Fold<T1, T2, T3>& x,
						const FC3Fold<T1, T2, T3>& y)
{
	if (x.first < y.first) return true;
	if (x.first > y.first) return false;
	if (x.second < y.second) return true;
	if (x.second > y.second) return false;
	return (x.third < y.third);
}

template<class T1, class T2, class T3>
inline bool operator > (const FC3Fold<T1, T2, T3>& x,
						const FC3Fold<T1, T2, T3>& y)
{
	return (y < x);
}

template<class T1, class T2, class T3>
inline bool operator <= (const FC3Fold<T1, T2, T3>& x,
						 const FC3Fold<T1, T2, T3>& y)
{
	return (!(y < x));
}

template<class T1, class T2, class T3>
inline bool operator >= (const FC3Fold<T1, T2, T3>& x,
						 const FC3Fold<T1, T2, T3>& y)
{
	return (!(x < y));
}

/*************************************************************************
 * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FC4Fold
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	pair _xZkqqHx_iCmM_xHqqkZx_4_xZkqqHx_iCmCjEmFiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.06.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
template<class T1, class T2, class T3, class T4> struct FC4Fold
{
	FC4Fold () : first(T1()), second(T2()), third(T3()), fourth(T4()) {}
	FC4Fold (const T1& v1, const T2& v2, const T3& v3, const T4& v4)
		: first(v1), second(v2), third(v3), fourth(v4) {}

	T1 first;
	T2 second;
	T3 third;
	T4 fourth;
}; // template<class T1, class T2, class T3, class T4> struct FC4Fold.

template<class T1, class T2, class T3, class T4>
inline bool operator == (const FC4Fold<T1, T2, T3, T4>& x,
						 const FC4Fold<T1, T2, T3, T4>& y)
{
	return (x.first == y.first &&
			x.second == y.second &&
			x.third == y.third &&
			x.fourth == y.fourth);
}

template<class T1, class T2, class T3, class T4>
inline bool operator != (const FC4Fold<T1, T2, T3, T4>& x,
						 const FC4Fold<T1, T2, T3, T4>& y)
{
	return (!(x == y));
}

template<class T1, class T2, class T3, class T4>
inline bool operator < (const FC4Fold<T1, T2, T3, T4>& x,
						const FC4Fold<T1, T2, T3, T4>& y)
{
	if (x.first < y.first) return true;
	if (x.first > y.first) return false;
	if (x.second < y.second) return true;
	if (x.second > y.second) return false;
	if (x.third < y.third) return true;
	if (x.third > y.third) return false;
	return (x.fourth < y.fourth);
}

template<class T1, class T2, class T3, class T4>
inline bool operator > (const FC4Fold<T1, T2, T3, T4>& x,
						const FC4Fold<T1, T2, T3, T4>& y)
{
	return (y < x);
}

template<class T1, class T2, class T3, class T4>
inline bool operator <= (const FC4Fold<T1, T2, T3, T4>& x,
						 const FC4Fold<T1, T2, T3, T4>& y)
{
	return (!(y < x));
}

template<class T1, class T2, class T3, class T4>
inline bool operator >= (const FC4Fold<T1, T2, T3, T4>& x,
						 const FC4Fold<T1, T2, T3, T4>& y)
{
	return (!(x < y));
}

/*************************************************************************
 * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FC2Ref
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOfBiPmGiMfOiCmM_xHqqkZx_pair_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.01.11 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
template<class T1, class T2> struct FC2Ref
{
	FC2Ref (T1& v1, T2& v2)
		: first(v1), second(v2) {}
//----- 06.11.03 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
	void operator = (const FC2Ref<T1, T2>& x)
		{
			first = x.first;
			second = x.second;
		}
//----- 06.11.03 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----
	void operator = (const FC2Fold<T1, T2>& x)
		{
			first = x.first;
			second = x.second;
		}
	T1& first;
	T2& second;
}; // template<class T1, class T2> struct FC2Ref.

//----- 06.11.03 Fukushiro M. _xZkqqHx_jCmHiJmBiOgO_xHqqkZx_ ()-----
/*************************************************************************
 * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FC3Ref
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOfBiPmGiMfOiCmM_xHqqkZx_FC3Fold_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.11.03 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
template<class T1, class T2, class T3> struct FC3Ref
{
	FC3Ref (T1& v1, T2& v2, T3& v3)
		: first(v1), second(v2), third(v3) {}
	void operator = (const FC3Ref<T1, T2, T3>& x)
		{
			first = x.first;
			second = x.second;
			third = x.third;
		}
	void operator = (const FC3Fold<T1, T2, T3>& x)
		{
			first = x.first;
			second = x.second;
			third = x.third;
		}
	T1& first;
	T2& second;
	T3& third;
}; // template<class T1, class T2, class T3> struct FC3Ref.

/*************************************************************************
 * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FC4Ref
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_iOfBiPmGiMfOiCmM_xHqqkZx_FC4Fold_xZkqqHx_iBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	06.11.03 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
template<class T1, class T2, class T3, class T4> struct FC4Ref
{
	FC4Ref (T1& v1, T2& v2, T3& v3, T4& v4)
		: first(v1), second(v2), third(v3), fourth(v4) {}
	void operator = (const FC4Ref<T1, T2, T3, T4>& x)
		{
			first = x.first;
			second = x.second;
			third = x.third;
			fourth = x.fourth;
		}
	void operator = (const FC4Fold<T1, T2, T3, T4>& x)
		{
			first = x.first;
			second = x.second;
			third = x.third;
			fourth = x.fourth;
		}
	T1& first;
	T2& second;
	T3& third;
	T4& fourth;
}; // template<class T1, class T2, class T3, class T4> struct FC4Ref.
//----- 06.11.03 Fukushiro M. _xZkqqHx_jCmHiJmBiPeJ_xHqqkZx_ ()-----

//;------ </EXPORT TO SDK> -----;

/*************************************************************************
 * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FCAutoDeleteCriticalSection
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	CriticalSection _xZkqqHx_iCmMiPiJiKpKiJlLiCmGjGjFiPmBiPiIjHjNiCpAiOkJjDkOiCmFiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	03.06.25 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
struct FCAutoDeleteCriticalSection
{
	FCAutoDeleteCriticalSection ()
	{
		InitializeCriticalSection(&cs);
	}
	~FCAutoDeleteCriticalSection ()
	{
		DeleteCriticalSection(&cs);
	}
	CRITICAL_SECTION cs;
}; // struct FCAutoDeleteCriticalSection.

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	FCAutoLeaveCriticalSection
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	CriticalSection _xZkqqHx_iCmMiPiJiKpKiJlLiCmGjGjFiPmBiPiIjHjNiCpAiOkJjDkOiCmFiNhDiCkEiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	04.08.19 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
class FCAutoLeaveCriticalSection
{
public:
	FCAutoLeaveCriticalSection (FCAutoDeleteCriticalSection& acs)
	{
		m_cs = &acs.cs;
		m_bEnter = FALSE;
		Enter();
	}
	FCAutoLeaveCriticalSection (const FCAutoDeleteCriticalSection& acs)
	{
		m_cs = (CRITICAL_SECTION*)&acs.cs;
		m_bEnter = FALSE;
		Enter();
	}
	void Enter ()
	{
		if (!m_bEnter)
			EnterCriticalSection(m_cs);
		m_bEnter = TRUE;
	}
	void Leave ()
	{
		if (m_bEnter)
			LeaveCriticalSection(m_cs);
		m_bEnter = FALSE;
	}
	BOOL IsEnter () const
	{
		return m_bEnter;
	}
	~FCAutoLeaveCriticalSection ()
	{
		Leave();
		m_cs = NULL;
	}
protected:
	CRITICAL_SECTION*	m_cs;
	BOOL				m_bEnter;
}; // class FCAutoLeaveCriticalSection.

template<class T> class FCCsAreaRead;
template<class T> class FCCsAreaWrite;
template<class T> class FCCsAreaReadWrite;

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	FCCsAreaDef
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	FCCsAreaDef _xZkqqHx_iCmNiBeB_xHqqkZx_T _xZkqqHx_iCmFiOhHjCoIiClDiCoKiCoJiNfMjBkCjBmMiCmMiDiBiDjDiDgPiBfLiCpAiBeBiDhNiDiLiDgAiDfIiDiMiDgCiDgI_xHqqkZx_
 *			_xZkqqHx_iCmFiLkEjHeMiClHiCoJiPoKiNiHiCmJiOgHiCoNiCoKiCoJiBeC_xHqqkZx_
 *			T_xZkqqHx_iNfMjBkCjBmMiCmMiDiBiDjDiDgPiBfLiCmNiBeBiDeOiDiKiDgFiDeCiDeKiDiLiDfKiDeOiDfGiDiHiDjDiCmFjFnLiMoMiClDiCoKiCoJiBeC_xHqqkZx_
 *			_xZkqqHx_iDeOiDiKiDgFiDeCiDeKiDiLiDfKiDeOiDfGiDiHiDjDiCmNiBeB_xHqqkZx_Read_xZkqqHx_jHhAiCmG_xHqqkZx_Write_xZkqqHx_jHhAiCkKjHhAiInDiClDiCoKiCoJiBeC_xHqqkZx_
 *			FCCsAreaDef _xZkqqHx_iCmNiBeB_xHqqkZx_FCCsAreaRead_xZkqqHx_iBeB_xHqqkZx_FCCsAreaWrite_xZkqqHx_iBeB_xHqqkZx_FCCsAreaReadWrite
 *			_xZkqqHx_iCmGjBgHiCnNiNiHiCoNiClJiCmEiOgHiCkEiBeC_xHqqkZx_
 *			_xZkqqHx_iImIiJlKiCmJiDfEiDjDiDhGiDiLiCpAiOkGiClHiBeC_xHqqkZx_
 *
 *			// _xZkqqHx_iDeOiDiKiDgFiDeCiDeKiDiLiDfKiDeOiDfGiDiHiDjDiCmFiLkEjHeMiClFiClNiCkCiNfMjBkCjBmM_xHqqkZx_ _T _xZkqqHx_iCmMjCoIiLgAiBeC_xHqqkZx_
 *			struct _T {
 *				long m_i;
 *				short m_j;
 *			};
 *
 *			// x_xZkqqHx_jCiGiCmJ_xHqqkZx__T_xZkqqHx_iCkKiNoMjAkMiClDiCoKiCoJiBeC_xHqqkZx_
 *			// _xZkqqHx_iClFiCkJiClFiBeBiClBiCmMiCnMiCnMiCmFiCmN_xHqqkZx_ x_xZkqqHx_jCiGiCmM_xHqqkZx_m_i_xZkqqHx_iBeB_xHqqkZx_m_j_xZkqqHx_iCmJiCmNiDeBiDeOiDfKiDfIiCmFiCkLiCmIiCkCiBeC_xHqqkZx_
 *			FCCsAreaDef<_T> x;
 *
 *			{
 *				// FCCsAreaRead_xZkqqHx_iDeOiDiJiDfIiCmMiDfCiDjDiDfIiDgHiDiJiDeOiDfOiCmJiBeB_xHqqkZx_x _xZkqqHx_iCpAjDgOiClHiBeC_xHqqkZx_
 *				// _xZkqqHx_iClBiCmMiPhFiKnEiBeB_xHqqkZx__T _xZkqqHx_iCmNiBeB_xHqqkZx_Read_xZkqqHx_iDeOiDiKiDgFiDeCiDeKiDiLiDfKiDeOiDfGiDiHiDjDiCmMjFnLiMoMiJlKiCmJjDpMiCoJiBeC_xHqqkZx_
 *				FCCsAreaRead<_T> a(x);
 *
 *				// _T_xZkqqHx_iCmMiDiBiDjDiDgPiBfLiCmJ_xHqqkZx_ a _xZkqqHx_iCkJiCoHiDeBiDeOiDfKiDfIiCmFiCkLiCoJiBeC_xHqqkZx_Read_xZkqqHx_iCmMiCnNiLjGiClDiCoKiCoJiBeC_xHqqkZx_
 *				printf("%d %d", a->m_i, a->m_j);
 *				// _xZkqqHx_iImIiJlKiCmNiDfCiDjDiDhAiDeDiDiLiDeHiDiJiBfLiBeC_xHqqkZx_
 *				a->m_i = 10;
 *			}
 *
 *			{
 *				// FCCsAreaReadWrite_xZkqqHx_iDeOiDiJiDfIiCmMiDfCiDjDiDfIiDgHiDiJiDeOiDfOiCmJiBeB_xHqqkZx_x _xZkqqHx_iCpAjDgOiClHiBeC_xHqqkZx_
 *				// _xZkqqHx_iClBiCmMiPhFiKnEiBeB_xHqqkZx__T _xZkqqHx_iCmNiBeB_xHqqkZx_Read And Write_xZkqqHx_iDeOiDiKiDgFiDeCiDeKiDiLiDfKiDeOiDfGiDiHiDjDiCmM_xHqqkZx_
 *				// _xZkqqHx_jFnLiMoMiJlKiCmJjDpMiCoJiBeC_xHqqkZx_
 *				FCCsAreaReadWrite<_T> a(x);
 *
 *				// _T_xZkqqHx_iCmMiDiBiDjDiDgPiBfLiCmJ_xHqqkZx_ a _xZkqqHx_iCkJiCoHiDeBiDeOiDfKiDfIiCmFiCkLiCoJiBeC_xHqqkZx_Read_xZkqqHx_iBeB_xHqqkZx_Write_xZkqqHx_iCmGiCoAiJmCjEfMiBeC_xHqqkZx_
 *				printf("%d %d", a->m_i, a->m_j);
 *				a->m_i = 10;
 *			}
 *
 *			{
 *				// FCCsAreaWrite_xZkqqHx_iDeOiDiJiDfIiCmMiDfCiDjDiDfIiDgHiDiJiDeOiDfOiCmJiBeB_xHqqkZx_x _xZkqqHx_iCpAjDgOiClHiBeC_xHqqkZx_
 *				// _xZkqqHx_iClBiCmMiPhFiKnEiBeB_xHqqkZx__T _xZkqqHx_iCmNiBeB_xHqqkZx_Write_xZkqqHx_iDeOiDiKiDgFiDeCiDeKiDiLiDfKiDeOiDfGiDiHiDjDiCmM_xHqqkZx_
 *				// _xZkqqHx_jFnLiMoMiJlKiCmJjDpMiCoJiBeC_xHqqkZx_
 *				FCCsAreaWrite<_T> a(x);
 *
 *				// _T_xZkqqHx_iCmMiDiBiDjDiDgPiBfLiCmJiCmNiDeBiDeOiDfKiDfIiCmFiCkLiCmIiCkCiBeC_xHqqkZx_FCCsAreaWrite _xZkqqHx_iCmN_xHqqkZx_
 *				// _xZkqqHx_jBlMiCmMiDfIiDiMiDgCiDgIiCmJ_xHqqkZx_ _T _xZkqqHx_iCmJiPjBiCkLiNjOiCnNiClFiCmEiCnJiClFiCkNiCmIiCkCiCmGiCkLiCmJ_xHqqkZx_
 *				// _xZkqqHx_jHmMiIoGiCpA_xHqqkZx_Write_xZkqqHx_jFnLiMoMiClHiCoJiClNiCnPiClOiCkPiCmJiOgHiCkEiBeC_xHqqkZx_
 *			}
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.10.31 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
template<class T> class FCCsAreaDef
{
friend class FCCsAreaRead<T>;
friend class FCCsAreaWrite<T>;
friend class FCCsAreaReadWrite<T>;
protected:
	FCAutoDeleteCriticalSection	m_acsRead;
	FCAutoDeleteCriticalSection	m_acsWrite;
	T	m_area;
}; // template<class T> class FCCsAreaDef.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCCsAreaRead
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	FCCsAreaRead _xZkqqHx_iCmNiBeB_xHqqkZx_T _xZkqqHx_iCmFiOhHjCoIiClDiCoKiCoJiNfMjBkCjBmMiCmMiDiBiDjDiDgPiBfLiCpAiBeBiDhNiDiLiDgAiDfIiDiMiDgCiDgI_xHqqkZx_
 *			_xZkqqHx_iCmFiLkEjHeMiClHiCoJiPoKiNiHiCmJiOgHiCoNiCoKiCoJiBeC_xHqqkZx_
 *			FCCsAreaDef _xZkqqHx_iCmMiLeAjEfMjAoAjGlOiCpAiOfBiPmGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.10.31 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
template<class T> class FCCsAreaRead : public FCAutoLeaveCriticalSection
{
public:
	FCCsAreaRead (const FCCsAreaDef<T>& def)
				:FCAutoLeaveCriticalSection(def.m_acsRead),
				 m_def(def) {}
	const T* operator -> () const
	{
		return &(m_def.m_area);
	}
protected:
	const FCCsAreaDef<T>&	m_def;
}; // template<class T> class FCCsAreaRead.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCCsAreaWrite
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	FCCsAreaWrite _xZkqqHx_iCmNiBeB_xHqqkZx_T _xZkqqHx_iCmFiOhHjCoIiClDiCoKiCoJiNfMjBkCjBmMiCmMiDiBiDjDiDgPiBfLiCpAiBeBiDhNiDiLiDgAiDfIiDiMiDgCiDgI_xHqqkZx_
 *			_xZkqqHx_iCmFiLkEjHeMiClHiCoJiPoKiNiHiCmJiOgHiCoNiCoKiCoJiBeC_xHqqkZx_
 *			FCCsAreaDef _xZkqqHx_iCmMiLeAjEfMjAoAjGlOiCpAiOfBiPmGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.10.31 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
template<class T> class FCCsAreaWrite : public FCAutoLeaveCriticalSection
{
public:
	FCCsAreaWrite (FCCsAreaDef<T>& def)
				:FCAutoLeaveCriticalSection(def.m_acsWrite),
				 m_def(def) {}
protected:
	FCCsAreaDef<T>&	m_def;
}; // template<class T> class FCCsAreaWrite.

/*************************************************************************
 * <_xZkqqHx_iKnGjAjE_xHqqkZx_>	FCCsAreaReadWrite
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	FCCsAreaReadWrite _xZkqqHx_iCmNiBeB_xHqqkZx_T _xZkqqHx_iCmFiOhHjCoIiClDiCoKiCoJiNfMjBkCjBmMiCmMiDiBiDjDiDgPiBfLiCpAiBeB_xHqqkZx_
 *			_xZkqqHx_iDhNiDiLiDgAiDfIiDiMiDgCiDgIiCmFiLkEjHeMiClHiCoJiPoKiNiHiCmJiOgHiCoNiCoKiCoJiBeC_xHqqkZx_
 *			FCCsAreaDef _xZkqqHx_iCmMiLeAjEfMjAoAjGlOiCpAiOfBiPmGiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	05.10.31 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
template<class T> class FCCsAreaReadWrite
{
public:
	FCCsAreaReadWrite (FCCsAreaDef<T>& def)
				:m_atlcsRead(def.m_acsRead),
				 m_atlcsWrite(def.m_acsWrite),
				 m_def(def) {}
	T* operator -> ()
	{
		return &(m_def.m_area);
	}
protected:
	FCCsAreaDef<T>&	m_def;
	FCAutoLeaveCriticalSection	m_atlcsRead;
	FCAutoLeaveCriticalSection	m_atlcsWrite;
}; // template<class T> class FCCsAreaReadWrite.

//;----- <EXPORT TO SDK> -----;

/*************************************************************************
 * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FCMolipRec
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	_xZkqqHx_jFjEjFgJ_xHqqkZx_ID_xZkqqHx_iBhLiDiCiDiKiDhGiCmMiDiMiDfCiBfLiDgIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	MOLIP(_xZkqqHx_iDiCiDiLiDhG_xHqqkZx_) = MOve LInk Point
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	99.05.17 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
struct FCMolipRec
{
	FCMolipRec () : dwObjID(0), lMolipId(0) {}
	FCMolipRec (DWORD id, long idx) : dwObjID(id), lMolipId(idx) {}

	DWORD	dwObjID;
	long	lMolipId;
}; // struct FCMolipRec.

inline bool operator < (const FCMolipRec& mlp0, const FCMolipRec& mlp1)
{
	if (mlp0.dwObjID == mlp1.dwObjID)
		return mlp0.lMolipId < mlp1.lMolipId;
	return mlp0.dwObjID < mlp1.dwObjID;
} // bool operator < .

inline bool operator != (const FCMolipRec& mlp0, const FCMolipRec& mlp1)
{
	return (mlp0.dwObjID != mlp1.dwObjID) || (mlp0.lMolipId != mlp1.lMolipId);
} // bool operator !=.

inline bool operator == (const FCMolipRec& mlp0, const FCMolipRec& mlp1)
{
	return !(mlp0 != mlp1);
} // bool operator ==.

//;------ </EXPORT TO SDK> -----;

/**********************************************************************
 *                      _xZkqqHx_iDfOiDeDiDhGjAoJiMlO_xHqqkZx_
 **********************************************************************/

//;----- <EXPORT TO SDK> -----;
typedef BOOL (*FuncForAllObject) (FCObjDynabase* pObj, void* data);

typedef basic_string<char>		astring;
typedef basic_string<_TCHAR>	tcstring;
typedef auto_ptr<char>			ACharAuto;
typedef auto_ptr<wchar_t>		WCharAuto;
typedef auto_ptr<_TCHAR>		TCHARAuto;

// _xZkqqHx_iKgFiOoN_xHqqkZx_vector. _xZkqqHx_iLeMiPhBiPmIjHkKiCmMiClNiCnPiBeC_xHqqkZx_
typedef vector<_TCHAR>			TCHARVector;
typedef vector<_TCHAR*>			TCHARPVector;
typedef vector<BYTE>			BYTEVector;
typedef vector<WORD>			WORDVector;
typedef vector<DWORD>			DWORDVector;
typedef vector<short>			shortVector;
typedef vector<long>			longVector;
typedef vector<float>			floatVector;
typedef vector<FLOAT>			FLOATVector;
typedef vector<double>			doubleVector;
typedef vector<DBLRect>			DBLRectVector;
typedef vector<DBLPoint>		DBLPointVector;
// 06.10.29 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
typedef vector<UINT>			UINTVector;

typedef vector<FCObjDynabase*>	ObjDynabaseVector;
typedef vector<wchar_t*>		WCharPVector;
typedef vector<TCHARAuto>		TCHARAutoVector;
typedef vector<WCharAuto>		WCharAutoVector;
typedef vector<DBLLine>			DBLLineVector;
typedef vector<wchar_t>			WCharVector;
typedef vector<mmetol>			mmetolVector;
typedef pair<long, long>		longPair;
typedef set<WORD>				WORDSet;
typedef set<DWORD>				DWORDSet;
// 06.10.29 Fukushiro M. 1_xZkqqHx_iNhDjCmHiJmB_xHqqkZx_ ()
typedef set<UINT>				UINTSet;
typedef set<long>				longSet;
typedef set<FCObjDynabase*>		ObjDynabaseSet;

struct FClongRange
{
	FClongRange (long a, long b) : lFrom(a), lTo(b) {}
	long lFrom;
	long lTo;
}; // struct FClongRange.

typedef vector<FClongRange> 	longRangeVector;

typedef vector<CRect>			CRectVector;
typedef vector<CPoint>			CPointVector;
typedef vector<CPropertyPage*>	CPropertyPageVector;
typedef vector<COleClientItem*>	COleClientItemPVector;

//;------ </EXPORT TO SDK> -----;

typedef complex<double>			dblcompex;

//----------<NOT EXPORT TO VIEWER>-----------

//----- 03.09.25 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FCHIDocumentPosition
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	WM_USER_OPEN_PROJECT_HI_DOC_POS_xZkqqHx_iCmMiIpIjAjEiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	02.01.23 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//struct FCHIDocumentPosition
//{
//	long	m_lDocumentId;			// _xZkqqHx_jHjKjHpAjFlGiPjB_xHqqkZx_ID_xZkqqHx_iBeC_xHqqkZx_
//	DWORD	m_dwSessionIndex;		// _xZkqqHx_jHjKjHpAiDhEiDeAiDeDiDiLjCiGiCmMiImKjChFiBeC_xHqqkZx_
//	wchar_t	m_tcsProjectPath[1];	// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiDhEiDeAiDeDiDiLjGlMiBeCjAoCjBmOiDhAiDfIiBeC_xHqqkZx_
//	static DWORD Allocate (	FCHIDocumentPosition*& pDocPos, long lDocumentId,
//							DWORD dwSessionIndex, const wchar_t* tcsProjectPath);
//	static void Free (FCHIDocumentPosition* pDocPos);
//}; // struct FCHIDocumentPosition.
//----- 03.09.25 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

//----- 03.09.25 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///*************************************************************************
// * <_xZkqqHx_iNfMjBkCjBmM_xHqqkZx_>	FCSheetCanvasPos
// *
// * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	WM_USER_SET_SHEET_AND_CENTER_L _xZkqqHx_iCmMiIpIjAjEiBeC_xHqqkZx_
// *
// * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	02.12.10 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
// *************************************************************************/
//struct FCSheetCanvasPos
//{
//	static FCSheetCanvasPos* Allocate (	DWORD& dwSCPosSz,
//										BOOL bRedraw, long lZoom256,
//										SheetID stid, mmetol mmX, mmetol mmY);
//	static void Free (FCSheetCanvasPos* pSCPos);
//
//	BOOL		m_bRedraw;
//	long		m_lZoom256;
//	SheetID		m_stid;
//	mmetol		m_mmX;
//	mmetol		m_mmY;
//}; // struct FCSheetCanvasPos.
//----- 03.09.25 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

//----------</NOT EXPORT TO VIEWER>-----------

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

//----- 06.01.18 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
///**********************************************************************
// *                      _xZkqqHx_iDePiDiNiBfLiDgPiDiLjFmPjAjE_xHqqkZx_
// **********************************************************************/
//
//struct FCGlobal
//{
//	void Initialize ();					// dDisplayPPM_xZkqqHx_jDjJiCmMiPiJiKpKiJlLiBeC_xHqqkZx_
//
//	WORD		appMode;				// _xZkqqHx_iDeBiDhGiDiKiOmAiNhDiDiCiBfLiDgIiBeC_xHqqkZx_
//										// FD_APPMODE_XXXXX | FD_RUNMODE_YYYYY _xZkqqHx_iCmMjBgHiCnNiNiHiCoNiClJiBeC_xHqqkZx_
//	double		dDisplayPPM;			// Display_xZkqqHx_iCmMjIfPjHjN_xHqqkZx_pixel/mm_xZkqqHx_iCpA_xHqqkZx_LOGPIXELSX_xZkqqHx_iCmFiOoGjDlOiBeC_xHqqkZx_
//	double		dRealDisplayPPMHorz;	// Display_xZkqqHx_iCmMjIfPjHjN_xHqqkZx_pixel/mm_xZkqqHx_iCpA_xHqqkZx_HORZRES/HORZSIZE_xZkqqHx_iCmFiOoGjDlOiBeC_xHqqkZx_
//	double		dRealDisplayPPMVert;	// Display_xZkqqHx_iCmMjIfPjHjN_xHqqkZx_pixel/mm_xZkqqHx_iCpA_xHqqkZx_VERTRES/VERTSIZE_xZkqqHx_iCmFiOoGjDlOiBeC_xHqqkZx_
//	long		lZoom256;				// _xZkqqHx_jEhLjHkGiBeCiPiJiKpKjCgMiCmN_xHqqkZx_256.CFCMainFrame_xZkqqHx_iCmFjAnNjCoIiBeC_xHqqkZx_
//	double		dZoom;
//	long		lZoom256Max;			// Zoom256_xZkqqHx_jCgMiCmMiNmFjBoFjCgMiBeCiClBiCmMjCgMiCpAiKnMiCnOiBeC_xHqqkZx_
//	long		lgOffsetX;				// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiDeJiDhEiDfKiDgCiDgHjCgMiBeC_xHqqkZx_
//	long		lgOffsetY;				// _xZkqqHx_iDfIiDeOiDiNiBfLiDiLiDeJiDhEiDfKiDgCiDgHjCgMiBeC_xHqqkZx_
//	FTDrawWhich	eDrawWhich;				// _xZkqqHx_iMlLiNnNiCmMjFgAiJoGjAoGiDgGiDgPiDeDiDfIiCpAjAnNjCoIiBeC_xHqqkZx_
//	double		lgdPrecision;			// _xZkqqHx_iLmIjApMiMhGiOfKiOjOiCmMjClIjDfPiKnEiCmMiLjHjHkDiBeCjIfPjHjNiNmAjFfHjCgMiBeC_xHqqkZx_
//}; // struct FCGlobal.
//
//extern FCGlobal*	g_;
//extern CPalette*	g_pFDPalette;		// MolipDraw_xZkqqHx_jHhAiDhAiDiMiDgCiDgHiBeC_xHqqkZx_
//
//extern FCEnv*				g_pEnv;				// _xZkqqHx_iKmCiLkLiBeC_xHqqkZx_
//extern FCRegData*			g_pReg;				// _xZkqqHx_iDiMiDfHiDfIiDgHiDiKiBeC_xHqqkZx_
//
////----------<NOT EXPORT TO VIEWER>-----------
//
//extern CFCFoundDoc*			g_pDoc;				// _xZkqqHx_iDgIiDeMiDiFiDiBiDjDiDgHiBeC_xHqqkZx_
//extern CFCMainFrame*		g_pFrame;			// _xZkqqHx_iDhEiDiMiBfLiDiAiBeC_xHqqkZx_
//extern CFCInPlaceFrame*		g_pInPlace;			// _xZkqqHx_iDeDiDjDiDhGiDiMiBfLiDfIiDhEiDiMiBfLiDiAiBeC_xHqqkZx_
//extern CFCDynamicDrawView*	g_pView;			// _xZkqqHx_iDhCiDiFiBfLiBeC_xHqqkZx_
//extern FCToolManager*		g_pToolManager;		// _xZkqqHx_iDgDiBfLiDiLiDhNiDgMiBfLiDfHiDiDiBeC_xHqqkZx_
//extern FCHiProject*			g_pProject;			// _xZkqqHx_iDhGiDiNiDfHiDeGiDeOiDgHiBeC_xHqqkZx_
//
//extern const int	g_nBitsPixel;			// GetDeviceCaps(BITSPIXEL).
//extern const DWORD	g_dwChipBits;			// ChipRec_xZkqqHx_iCmM_xHqqkZx_m_pBits_xZkqqHx_iCmMiDfEiDeDiDfJiBeC_xHqqkZx_
//extern const DWORD	g_dwPictArrowBits;		// PictArrowRec_xZkqqHx_iCmM_xHqqkZx_m_pBits_xZkqqHx_iCmMiDfEiDeDiDfJiBeC_xHqqkZx_
//extern const CLIPFORMAT	g_cfDDFile;			// Dynamic Draw_xZkqqHx_iCmMiDeOiDiKiDgCiDhGiDhLiBfLiDgIiDfCiDhDiBfLjHhA_xHqqkZx_ Native File Data _xZkqqHx_iCmMiMgAiOkOjGlMiBeC_xHqqkZx_
//extern const CLIPFORMAT	g_cfObjFigure;		// g_cfDDFile_xZkqqHx_iCmFiBeB_xHqqkZx_ObjFigure_xZkqqHx_iCkKiCfAiCmCiCmMiCnNjDgPjIfOiCmMiPoKiNiHiCmJiBeBiLeMjIfOiClDiCoKiCoJiBeC_xHqqkZx_
//extern const CLIPFORMAT	g_cfDDText;			// Dynamic Draw_xZkqqHx_iCmMiDgFiDeMiDfIiDgHiDeOiDiKiDgCiDhGiDhLiBfLiDgIiDfCiDhDiBfLjHhAiBeC_xHqqkZx_
//extern const CLIPFORMAT	g_cfRTF;			// RTF_xZkqqHx_iDhEiDeIiBfLiDhNiDgCiDgHiBeC_xHqqkZx_
//extern const CLIPFORMAT	g_cfEmbeddedObject;	// OLE_xZkqqHx_iDgGiBfLiDfOiBeC_xHqqkZx_
//extern const CLIPFORMAT	g_cfEmbedSource;	// OLE_xZkqqHx_iDfMiBfLiDfIiBeC_xHqqkZx_
//extern const CLIPFORMAT	g_cfCsvText;		// CSV_xZkqqHx_iDgFiDeMiDfIiDgHiBgJ_xHqqkZx_Paste_xZkqqHx_iOjOiCmMiOkPjFmKiCmJiCmMiCnNiOgHjHhAiBgK_xHqqkZx_
//extern const CLIPFORMAT	g_cfCsvUnicodeText;	// CSV Unicode_xZkqqHx_iDgFiDeMiDfIiDgHiBgJ_xHqqkZx_Paste_xZkqqHx_iOjOiCmMiOkPjFmKiCmJiCmMiCnNiOgHjHhAiBgK_xHqqkZx_
//// 05.07.12 Fukushiro M. 1_xZkqqHx_iNhDiNoNiPjM_xHqqkZx_ ()
////extern const CLIPFORMAT	g_cfLinkSource;		// _xZkqqHx_iDiKiDjDiDeOjDfMiCoIjFhEiCkPiBeC_xHqqkZx_
//
//// _xZkqqHx_iDePiDiNiBfLiDgPiDiLjFmPjAjEiCmMiDgPiDgCiDeOiDeBiDgCiDhGiBeC_xHqqkZx_
//extern void FFGlobalBackup ();
//// _xZkqqHx_iDePiDiNiBfLiDgPiDiLjFmPjAjEiCmMjFjMiLeBiBeC_xHqqkZx_
//extern void FFGlobalRestore ();
//
////----- 03.07.06 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
////// _xZkqqHx_iDePiDiNiBfLiDgPiDiLjFmPjAjEiPiJiKpKiJlLiBeC_xHqqkZx_
////extern void FFInitExtern ();
////----- 03.07.06 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----
//
////----------</NOT EXPORT TO VIEWER>-----------
//----- 06.01.18 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/**********************************************************************
 *       _xZkqqHx_iDePiDiNiBfLiDgPiDiLiKnGjAjEiBeC_xHqqkZx_
 **********************************************************************/

// _xZkqqHx_iDePiDiNiBfLiDgPiDiLiKnGjAjEiCmN_xHqqkZx_UtilMisc_xZkqqHx_iCnGiInKjDkOiBeC_xHqqkZx_
// _xZkqqHx_iDhGiDiJiDePiDeDiDjD_xHqqkZx_SDK_xZkqqHx_iCmFiCmMiMpGiKeKiCmMiClNiCnPiBeC_xHqqkZx_

//----- 05.05.28 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//// _xZkqqHx_iDgPiBfLiDfHiDiHiDjDiPoOjFpBiBeC_xHqqkZx_
//extern const OSVERSIONINFO& FFVersionInfo ();	// version information.
//// _xZkqqHx_iDeFiDeCiDjDiDgIiDeFiDeMiDiDiDhGiDgAiDiDiKnGjIeBiBeC_xHqqkZx_
//extern HWND FFGetCapture ();
//extern void FFSetCapture (HWND hwnd);
//extern void FFReleaseCapture ();
//extern void FFUpdateCapture ();
//extern HINSTANCE FFLoadLibrary (const wchar_t* wcpModuleName);
//extern BOOL FFFreeLibrary (HINSTANCE hInstLib);
//----- 05.05.28 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

/**********************************************************************
 *       _xZkqqHx_iDiGiBfLiDgFiDeCiDiKiDgFiDeCiDhNiDeOiDiNiBeFiDeDiDjDiDiJiDeDiDjDiKnGjAjEiBeFiDgFiDjDiDhGiDiMiBfLiDgH_xHqqkZx_
 **********************************************************************/

/************************** _xZkqqHx_jBoDjDpMiBeFiOgMiOmMiMnMjDpMjDjJ_xHqqkZx_ ************************/

/*************************************************************************
 * <_xZkqqHx_iDhNiDeOiDiN_xHqqkZx_>	D2L
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	double_xZkqqHx_iMfOiCmMiPkMjAjEjDfPjBoGiCfAiMiFiCpAiOgMiOmMiMnMjDpMiClFiBeB_xHqqkZx_long_xZkqqHx_iMfOiCmJjFmPiNfIiClHiCoJ_xHqqkZx_.
 *
 * <_xZkqqHx_iJpAjAoA_xHqqkZx_>	_xZkqqHx_iOgMiOmMiMnMjDpMiCpAiImIiJlKiCmMjHgMiCmJjCoIiLgAiClHiCoJiBeC_xHqqkZx_
 *			    _xZkqqHx_iBeG_xHqqkZx_
 *			 0.6 -> 1
 *			 0.5 -> 1
 *			 0.4 -> 0
 *			 0.3 -> 0
 *			    _xZkqqHx_iBeG_xHqqkZx_
 *			-0.4 -> 0
 *			-0.5 -> 0
 *			-0.6 -> -1
 *			-0.7 -> -1
 *
 *			long_xZkqqHx_iMfOiCmMiDeMiDiDiDfIiDgHiCmNjAlDjFiJiCmJiKnGiCoNiCoHiClIiPkMjAjEjDfPiImIiJlKiCpAjAnIiCoIiOmMiCmEiCoJ_xHqqkZx_.
 *			(long)1.xxx -> 1
 *			(long)-1.xxx -> -1
 *			_xZkqqHx_iClFiClNiCkKiCmBiCmEiBeBiImIiJlKiCmMiDeBiDiLiDfDiDiKiDfJiDiAiCmFiOgMiOmMiMnMjDpMiCpAiOmAiMlLiCmFiCkLiCoJ_xHqqkZx_.
 *			a_xZkqqHx_iCkKjAlDiCmMiPoKiNiH_xHqqkZx_.(long)(a + 0.5)
 *			(long)(0.6 + 0.5) => (long)(1.1) => 1
 *			(long)(0.5 + 0.5) => (long)(1.0) => 1
 *			(long)(0.4 + 0.5) => (long)(0.9) => 0
 *			(long)(0.3 + 0.5) => (long)(0.8) => 0
 *			a_xZkqqHx_iCkKjFiJiCmMiPoKiNiH_xHqqkZx_.(long)(a - 0.4)
 *			(long)(-0.4 - 0.4) => (long)(-0.8) => 0
 *			(long)(-0.5 - 0.4) => (long)(-0.9) => 0
 *			(long)(-0.6 - 0.4) => (long)(-1.0) => -1
 *			(long)(-0.7 - 0.4) => (long)(-1.1) => -1
 *************************************************************************/
#define D2L(a)  (0 < (a) ? (long)((a) + 0.5) : (long)((a) - 0.4))
#define D2LL(a)  (0 < (a) ? (__int64)((a) + 0.5) : (__int64)((a) - 0.4))
#define D2DW(a)  (DWORD((a) + 0.5))

inline void RSUB (double& dA, double dB)
{
	dA = dB;
} // RSUB.

inline void RSUB (long& lA, long lB)
{
	lA = lB;
} // RSUB.

inline void RSUB (long& lA, double dB)
{
	lA = 0 < dB ? (long)(dB + 0.5) : (long)(dB - 0.4);
} // RSUB.

inline void RSUB (double& dA, long lB)
{
	dA = lB;
} // RSUB.

inline void RSUB (DBLPoint& dptA, const DBLPoint& dptB)
{
	dptA.SetPoint(dptB);
} // RSUB.

inline void RSUB (DBLPoint& dptA, const CPoint& ptB)
{
	dptA.SetPoint(ptB);
} // RSUB.

inline void RSUB (CPoint& ptA, const DBLPoint& dptB)
{
	ptA.x = D2L(dptB.x);
	ptA.y = D2L(dptB.y);
} // RSUB.

inline void RSUB (CRect& rtA, const DBLRect& drtB)
{
	rtA.left = D2L(drtB.left);
	rtA.top = D2L(drtB.top);
	rtA.right = D2L(drtB.right);
	rtA.bottom = D2L(drtB.bottom);
} // RSUB.

inline void RSUB (DBLRect& drtA, const CRect& rtB)
{
	drtA = rtB;
} // RSUB.

template<class T>
void NormalizeRect (T& left, T& top, T& right, T& bottom)
{
	T	tmp;
	if (right < left)
	{
		tmp	= left;
		left	= right;
		right	= tmp;
	}
	if (bottom < top)
	{
		tmp	= top;
		top	= bottom;
		bottom	= tmp;
	}
} // NormalizeRect.

#define ALIGNMENT4(x) ((long(x) / 4 + ((long(x) % 4) ? 1 : 0)) * 4)
#define ALIGNMENT8(x) ((long(x) / 8 + ((long(x) % 8) ? 1 : 0)) * 8)

#define Smaller(smaller, value) \
	if ((value) < (smaller))	(smaller) = (value);

#define Larger(larger, value) \
	if ((larger) < (value))	(larger) = (value);

template<class T>
void SmallerOrLarger (T& smaller, T& larger, T value)
{
//----- 05.03.04 Fukushiro M. _xZkqqHx_jFmPiNfIjBeP_xHqqkZx_ ()-----
//	if (value < smaller)		smaller = value;
//	else if (larger < value)	larger = value;
//----- 05.03.04 Fukushiro M. _xZkqqHx_jFmPiNfIiMoD_xHqqkZx_ ()-----
	if (value < smaller)	smaller = value;
	if (larger < value)		larger = value;
//----- 05.03.04 Fukushiro M. _xZkqqHx_jFmPiNfIiPeJ_xHqqkZx_ ()-----
} // SmallerOrLarger.

template<class T>
inline void Exchange (T& a, T& b)
{
	T c;
	c = a;
	a = b;
	b = c;
} // Exchange.

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

/*************************************************************************
 * <_xZkqqHx_iDeOiDiJiDfI_xHqqkZx_>	WString
 *
 * <_xZkqqHx_iLeAjEfM_xHqqkZx_>	wchar_t_xZkqqHx_iMfOjFlGiOjKjHpBiCpAiIlFiCkEiDeOiDiJiDfIiBeC_xHqqkZx_
 *
 * <_xZkqqHx_jHjKjHpA_xHqqkZx_>	02.02.05 Fukushiro M. _xZkqqHx_iNoMjAkM_xHqqkZx_
 *************************************************************************/
class WString : public wstring
{
protected:
typedef wstring BASE_CLASS;

public:
	WString ();
	WString (const wchar_t* s);
	WString (const wchar_t* s, long lCount);
	WString (const wchar_t* first, const wchar_t* last);
	WString (long lC, wchar_t wc);

	int GetLength () const;
	BOOL IsEmpty () const;
	void Empty ();
	wchar_t GetAt (int nIndex) const;
	void SetAt (int nIndex, wchar_t wc);
	wchar_t GetFirst () const;
	void SetFirst (wchar_t wc);
	wchar_t GetLast () const;
	void SetLast (wchar_t wc);
	void ChopFirst ();
	void ChopLast ();
	void ChopFirst (wchar_t wc);
	void ChopLast (wchar_t wc);

	WString& UpperCase ();
	WString& LowerCase ();

	operator const wchar_t* () const;
	int CompareNoCase (const wchar_t* lpsz) const;
	int CompareTail (const wchar_t* lpsz) const;
	int CompareTailNoCase (const wchar_t* lpsz) const;

	WString Mid (int nFirst) const;
	WString Mid (int nFirst, int nCount) const;
	WString Left (int nCount) const;
	WString Right (int nCount) const;
	WString SpanExcluding (const wchar_t* lpszCharSet) const;
	WString SpanSame (const wchar_t* wcpStr) const;
	long CharCount (wchar_t wc) const;

	BOOL Replace (wchar_t chOld, wchar_t chNew);
	BOOL Replace (const wchar_t* lpszOld, const wchar_t* lpszNew);

	void TrimLeft ();
	void TrimLeft (wchar_t chTarget);
	void TrimRight ();
	void TrimRight (wchar_t chTarget);

	int Find (wchar_t ch) const;
	int Find (const wchar_t* wcpSub) const;
	int ReverseFind (wchar_t ch) const;

	void Insert (int nIndex, wchar_t ch);
	void Insert (int nIndex, const wchar_t* pstr);
	void Delete (int nIndex, int nCount = 1);

	void Format (const wchar_t* lpszFormat, ...);
	void Format (DWORD dwId, ...);
	void FormatV (const wchar_t* lpszFormat, va_list argList);

	BOOL LoadString (UINT nID);
	WString& LoadStringSelf (UINT nID);
}; // class WString.

inline WString operator + (const WString& string1, const WString& string2)
{
	return (WString&)( WString(string1) += string2 );
} // WString operator + .

inline WString operator + (const WString& string1, const wchar_t* string2)
{
	return (WString&)( WString(string1) += string2 );
} // WString operator + .

inline WString operator + (const WString& string1, wchar_t wc2)
{
	return (WString&)( WString(string1) += wc2 );
} // WString operator + .

inline BOOL operator == (const WString& wstr1, const wchar_t* wcp2)
{
	return (wcscmp(wstr1.c_str(), wcp2) == 0);
} // operator == (const WString& wstr1, const wchar_t* wcp2)

inline BOOL operator != (const WString& wstr1, const wchar_t* wcp2)
{
	return (wcscmp(wstr1.c_str(), wcp2) != 0);
} // operator != (const WString& wstr1, const wchar_t* wcp2)

extern BYTEVector& operator << (BYTEVector& vStream, const WString& wstr);
extern BYTEVector& operator << (BYTEVector& vStream, WString& wstr);
extern void FFReadData (WString& wstr, const BYTE*& pStream);
extern void FFSkipData (WString* pwstr, const BYTE*& pStream);
extern void FFSkipData (const WString* pwstr, const BYTE*& pStream);

// _xZkqqHx_iImIiJlKiCmN_xHqqkZx_ MolipSDK_xZkqqHx_iCnG_xHqqkZx_Export_xZkqqHx_jHhAiBeC_xHqqkZx_
#if 0
//;----- <EXPORT TO SDK> -----;
typedef wstring	WString;
//;------ </EXPORT TO SDK> -----;
#endif //0

//;----- <EXPORT TO SDK> -----;

typedef pair<WString, WString>	WStringPair;
typedef vector<WString>			WStringVector;
typedef set<WString>			WStringSet;
typedef map<GUID, WString> 		GuidToUserNameMap;

////////////////////////////////////////////////////////////////////
// _xZkqqHx_iDiGiDgKiDfCiBfLiDgIjFmPiKlHiBeC_xHqqkZx_

struct AStrToWStr
{
	AStrToWStr (const char* pStr, WORD wCodePage = CP_ACP)
		{
			if (pStr != NULL)
			{
				int iBuffSz = int(strlen(pStr)) + 1;
				m_pBuff = WCharAuto(new wchar_t[iBuffSz]);
				if (wCodePage == CP_UTF8)
					MultiByteToWideChar(wCodePage, 0, pStr, -1, m_pBuff.get(), iBuffSz);
				else
					MultiByteToWideChar(wCodePage, MB_PRECOMPOSED, pStr, -1, m_pBuff.get(), iBuffSz);
			}
		} // AStrToWStr::AStrToWStr.

	AStrToWStr (char c, WORD wCodePage = CP_ACP)
		{
			m_pBuff = WCharAuto(new wchar_t[2]);
			if (wCodePage == CP_UTF8)
				MultiByteToWideChar(wCodePage, 0, &c, 1, m_pBuff.get(), 2);
			else
				MultiByteToWideChar(wCodePage, MB_PRECOMPOSED, &c, 1, m_pBuff.get(), 2);
		} // AStrToWStr::AStrToWStr.

	operator const wchar_t* () const
		{
			return m_pBuff.get();
		} // AStrToWStr::operator const wchar_t* ().

	operator WString () const
		{
			return WString(m_pBuff.get());
		} // AStrToWStr::operator WString () const.

	operator wchar_t () const
		{
			return m_pBuff.get()[0];
		} // AStrToWStr::operator wchar_t () const.

	WCharAuto	m_pBuff;
}; // struct AStrToWStr.

struct WStrToAStr
{
	WStrToAStr (const wchar_t* pStr, WORD wCodePage = CP_ACP)
		{
			if (pStr != NULL)
			{
				int iBuffSz = int(wcslen(pStr) + 1) * sizeof(wchar_t);
				m_pBuff = ACharAuto(new char[iBuffSz]);
				if (WideCharToMultiByte(wCodePage, 0, pStr, -1, m_pBuff.get(), iBuffSz, NULL, NULL) == 0)
				//----- CP_UTF8 _xZkqqHx_iCmIiCmHiBeB_xHqqkZx_2_xZkqqHx_jEhLiImIiPoDiCmJjGgDiCoKiPoDiCkKiCoJiJmCjEfMjAkLiCoAiCkAiCoI_xHqqkZx_ -----
				{
					iBuffSz = WideCharToMultiByte(wCodePage, 0, pStr, -1, NULL, 0, NULL, NULL);
					m_pBuff = ACharAuto(new char[iBuffSz]);
					WideCharToMultiByte(wCodePage, 0, pStr, -1, m_pBuff.get(), iBuffSz, NULL, NULL);
				}
			}
		} // WStrToAStr::WStrToAStr.

	WStrToAStr (const WString& str, WORD wCodePage = CP_ACP)
		{
			int iBuffSz = int(str.length() + 1) * sizeof(wchar_t);
			m_pBuff = ACharAuto(new char[iBuffSz]);
			if (WideCharToMultiByte(wCodePage, 0, str.c_str(), -1, m_pBuff.get(), iBuffSz, NULL, NULL) == 0)
			//----- CP_UTF8 _xZkqqHx_iCmIiCmHiBeB_xHqqkZx_2_xZkqqHx_jEhLiImIiPoDiCmJjGgDiCoKiPoDiCkKiCoJiJmCjEfMjAkLiCoAiCkAiCoI_xHqqkZx_ -----
			{
				iBuffSz = WideCharToMultiByte(wCodePage, 0, str.c_str(), -1, NULL, 0, NULL, NULL);
				m_pBuff = ACharAuto(new char[iBuffSz]);
				WideCharToMultiByte(wCodePage, 0, str.c_str(), -1, m_pBuff.get(), iBuffSz, NULL, NULL);
			}
		} // WStrToAStr::WStrToAStr.

	operator const char* () const
		{
			return m_pBuff.get();
		} // WStrToAStr::operator const char*.

	ACharAuto	m_pBuff;
}; // struct WStrToAStr.

struct WStrToWStr
{
	WStrToWStr (const wchar_t* pStr, WORD wCodePage = CP_ACP)
		{
			pBuff = pStr;
		} // WStrToWStr::WStrToWStr.

	WStrToWStr (const WString& str, WORD wCodePage = CP_ACP)
		{
			pBuff = str.c_str();
		} // WStrToWStr::WStrToWStr.

	operator const wchar_t* () const
		{
			return pBuff;
		} // WStrToWStr::operator const wchar_t*.

	operator WString () const
		{
			return WString(pBuff);
		} // WStrToWStr::operator WString () const.

	const wchar_t*	pBuff;
}; // struct WStrToWStr.

struct AStrToAStr
{
	AStrToAStr (const char* pStr, WORD wCodePage = CP_ACP)
		{
			pBuff = pStr;
		} // AStrToAStr::AStrToAStr.

	AStrToAStr (char c, WORD wCodePage = CP_ACP)
		{
			pBuff = (const char*)c;
		} // AStrToAStr::AStrToAStr.

// 05.05.09 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	operator const _TCHAR* () const
	operator const char* () const
		{
			return pBuff;
		} // AStrToAStr::operator const char*.

// 05.05.09 Fukushiro M. 1_xZkqqHx_iNhDjFmPiNfI_xHqqkZx_ ()
//	operator _TCHAR () const
	operator char () const
		{
			return char(pBuff);
		} // AStrToAStr::operator const char*.

	const char*	pBuff;
}; // struct AStrToAStr.

#if defined(_MBCS)

typedef WStrToAStr WStrToTStr;
typedef AStrToWStr TStrToWStr;
typedef AStrToAStr AStrToTStr;
typedef AStrToAStr TStrToAStr;

#elif defined(_UNICODE)

typedef WStrToWStr WStrToTStr;
typedef WStrToWStr TStrToWStr;
typedef AStrToWStr AStrToTStr;
typedef WStrToAStr TStrToAStr;

#endif//_UNICODE

//;------ </EXPORT TO SDK> -----;

#endif//__FdExtern_h
