// Global.cpp
//

#include "stdafx.h"
#include "2Global.h"

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

static double myGetDisplayPPM ()
{
	// _xZkqqHx_iDgGiDeCiDfIiDhGiDiMiDeDiCmM_xHqqkZx_HDC_xZkqqHx_iCpAiNoMjAkMiBeC_xHqqkZx_
	HDC hAttribDC = ::CreateDC(_T("DISPLAY"), NULL, NULL, NULL);
	if (hAttribDC == NULL) return 0.0;
	return (double)GetDeviceCaps(hAttribDC, LOGPIXELSX) / 25.4;
}

double	g_dDisplayPPM = myGetDisplayPPM();
double	g_dZoom = g_dDisplayPPM;

MC2Document*	g_pDoc = NULL;

//----- 06.05.12 Fukushiro M. _xZkqqHx_iNoNiPjMiOgO_xHqqkZx_ ()-----
//IMpgMolipMain*	g_pMolipMainI = NULL;
//
//void operator << (CArchive& ar, const DBLPoint& mmpt)
//{
//	ar.Write(&mmpt, sizeof(mmpt));
//}
//
//void operator << (CArchive& ar, const DBLRect& mmrt)
//{
//	ar.Write(&mmrt, sizeof(mmrt));
//}
//
//void operator << (CArchive& ar, const CLSID& clsid)
//{
//	ar.Write(&clsid, sizeof(clsid));
//}
//
//void operator >> (CArchive& ar, DBLPoint& mmpt)
//{
//	ar.Read(&mmpt, sizeof(mmpt));
//}
//
//void operator >> (CArchive& ar, DBLRect& mmrt)
//{
//	ar.Read(&mmrt, sizeof(mmrt));
//}
//
//void operator >> (CArchive& ar, CLSID& clsid)
//{
//	ar.Read(&clsid, sizeof(clsid));
//}
//
//void FFReadString (CArchive& ar, WString& wstr)
//{
//	WORD wLen;
//	ar >> wLen;
//	vector<wchar_t> wvBuff(wLen);
//	ar.Read(&wvBuff.front(), wLen * sizeof(wchar_t));
//	wvBuff.push_back(L'\0');
//	wstr = &wvBuff.front();
//}
//
//void FFWriteString (CArchive& ar, const WString& wstr)
//{
//	ar << WORD(wstr.length());
//	ar.Write(wstr.c_str(), UINT(wstr.length() * sizeof(wchar_t)));
//}
//----- 06.05.12 Fukushiro M. _xZkqqHx_iNoNiPjMiPeJ_xHqqkZx_ ()-----

