Files
Slnkdwf/SlnkDWFCom/SLNKEvent.h
Jos Groot Lipman 15b53055ee Label was altijd al key
Versie 2.80

svn path=/Slnkdwf/trunk/; revision=12532
2012-01-11 19:28:42 +00:00

102 lines
2.7 KiB
C++

// SLNKEvent.h : Declaration of the CSLNKEvent
#pragma once
#include "resource.h" // main symbols
#include "SLNKDWF.h"
#include "BoundingBox.h"
// CSLNKEvent
class ATL_NO_VTABLE CSLNKEvent :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CSLNKEvent, &CLSID_SLNKEvent>,
public IDispatchImpl<ISLNKEvent, &IID_ISLNKEvent, &LIBID_SLNKDWFLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{
public:
CSLNKEvent()
{
}
//REMOVED DECLARE_REGISTRY_RESOURCEID(IDR_SLNKEVENT)
BEGIN_COM_MAP(CSLNKEvent)
COM_INTERFACE_ENTRY(ISLNKEvent)
COM_INTERFACE_ENTRY(IDispatch)
END_COM_MAP()
DECLARE_PROTECT_FINAL_CONSTRUCT()
HRESULT FinalConstruct()
{
//
// Maak object m_dwgBounding
//
CComObject<CBoundingBox> *pBoundingBox;
HRESULT hr = CComObject<CBoundingBox>::CreateInstance(&pBoundingBox);
if(FAILED(hr)) return hr;
pBoundingBox->AddRef();
hr = pBoundingBox->QueryInterface(IID_IBoundingBox, (void **)&m_dwgBounding);
pBoundingBox->Release();
if(FAILED(hr)) return hr;
//
// Maak object m_viewBounding
//
hr = CComObject<CBoundingBox>::CreateInstance(&pBoundingBox);
if(FAILED(hr)) return hr;
pBoundingBox->AddRef();
hr = pBoundingBox->QueryInterface(IID_IBoundingBox, (void **)&m_viewBounding);
pBoundingBox->Release();
if(FAILED(hr)) return hr;
return S_OK;
}
void FinalRelease()
{
}
private:
CComQIPtr<IBoundingBox> m_dwgBounding;
CComQIPtr<IBoundingBox> m_viewBounding;
double m_DwgX, m_DwgY;
double m_EdgeAngle;
double m_EdgeDistance;
double m_minDwgX, m_maxDwgY;
double m_maxDwgX, m_minDwgY;
CString m_ContourKey, m_ContourLayer;
CString m_TextLabel, m_TextLayer;
public:
STDMETHOD(get_DwgX)(DOUBLE* pVal);
STDMETHOD(put_DwgX)(DOUBLE newVal);
STDMETHOD(get_DwgY)(DOUBLE* pVal);
STDMETHOD(put_DwgY)(DOUBLE newVal);
STDMETHOD(get_ContourLabel)(BSTR* pVal); // DEPRECATED 2.80
STDMETHOD(put_ContourLabel)(BSTR newVal); // DEPRECATED 2.80
STDMETHOD(get_ContourKey)(BSTR* pVal);
STDMETHOD(put_ContourKey)(BSTR newVal);
STDMETHOD(get_ContourLayer)(BSTR* pVal);
STDMETHOD(put_ContourLayer)(BSTR newVal);
STDMETHOD(get_TextLabel)(BSTR* pVal);
STDMETHOD(put_TextLabel)(BSTR newVal);
STDMETHOD(get_TextLayer)(BSTR* pVal);
STDMETHOD(put_TextLayer)(BSTR newVal);
STDMETHOD(get_found)(IDWGPoint** pVal);
STDMETHOD(get_dwgExtents)(IBoundingBox** pVal);
STDMETHOD(get_viewExtents)(IBoundingBox** pVal);
STDMETHOD(get_EdgeAngle)(DOUBLE* pVal);
STDMETHOD(put_EdgeAngle)(DOUBLE newVal);
STDMETHOD(get_EdgeDistance)(DOUBLE* pVal);
STDMETHOD(put_EdgeDistance)(DOUBLE newVal);
};
//REMOVED OBJECT_ENTRY_AUTO(__uuidof(SLNKEvent), CSLNKEvent)