www.pudn.com > GeoExpert-6-1.rar   To Read all the content


[file head]:
#include "stdafx.h"
#include <afxconv.h>
#include "mapx.h"

/////////////////////////////////////////////////////////////////////////////
// CMapX

#ifdef CWND_MAPX
IMPLEMENT_DYNCREATE(CMapX, CWnd)
#endif

/////////////////////////////////////////////////////////////////////////////
// CMapX properties

CString CMapX::GetDataSetGeoField()
{
CString result;
GetProperty(0x1, VT_BSTR, (void*)&amt;result);
return result;
}

void CMapX::SetDataSetGeoField(LPCTSTR propVal)
{
SetProperty(0x1, VT_BSTR, propVal);
}

CString CMapX::GetVersion()
{
CString result;
GetProperty(0x2, VT_BSTR, (void*)&amt;result);
return result;
}

OLE_HANDLE CMapX::GetHWnd()
{
OLE_HANDLE result;
GetProperty(DISPID_HWND, VT_I4, (void*)&amt;result);
return result;
}

CMapXAnnotations CMapX::GetAnnotations()
{
LPDISPATCH result;
GetProperty(0x3, VT_DISPATCH, (void*)&amt;result);
return CMapXAnnotations(result);
}

CMapXLayers CMapX::GetLayers()
{
LPDISPATCH result;
GetPro
... ...

[file tail]:
... ...
_METHOD, VT_EMPTY, NULL, NULL);
}

CMapXVariables CMapXVariables::Clone()
{
LPDISPATCH result;
InvokeHelper(0x6, DISPATCH_METHOD, VT_DISPATCH, (void*)&amt;result, NULL);
return CMapXVariables(result);
}


/////////////////////////////////////////////////////////////////////////////
// CMapXVariable properties

CString CMapXVariable::GetName()
{
CString result;
GetProperty(0x1, VT_BSTR, (void*)&amt;result);
return result;
}

VARIANT CMapXVariable::GetValue()
{
VARIANT result;
GetProperty(0x2, VT_VARIANT, (void*)&amt;result);
return result;
}

void CMapXVariable::SetValue(const VARIANT&amt; propVal)
{
SetProperty(0x2, VT_VARIANT, &amt;propVal);
}

CLSID GetClassID(LPCTSTR pszProgramID)
{
CLSID clsid;
USES_CONVERSION;
HRESULT hr = CLSIDFromProgID(T2COLE(pszProgramID), &amt;clsid);
if(hr != S_OK)
{
AfxThrowOleException(hr);
}
return clsid;
}

/////////////////////////////////////////////////////////////////////////////
// CMapXVariable operations