#if !defined(AFX_INDICATOR2CTL_H__12EBBB76_579B_4CCD_9497_0C9737E3A6A9__INCLUDED_)
#define AFX_INDICATOR2CTL_H__12EBBB76_579B_4CCD_9497_0C9737E3A6A9__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// Indicator2Ctl.h : Declaration of the CIndicator2Ctrl ActiveX Control class.

/////////////////////////////////////////////////////////////////////////////
// CIndicator2Ctrl : See Indicator2Ctl.cpp for implementation.

class CIndicator2Ctrl : public COleControl
{
	DECLARE_DYNCREATE(CIndicator2Ctrl)

// Constructor
public:
	CIndicator2Ctrl();

	// Type def
	enum IndicatorType {
		LatLongDD = 0,
		LatLongDDMM,
		LatLongDDMMSS,
		Temperature,
		Angle,
		Time
	};

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CIndicator2Ctrl)
	public:
	virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
	virtual void DoPropExchange(CPropExchange* pPX);
	virtual void OnResetState();
	//}}AFX_VIRTUAL

// Implementation
protected:
	~CIndicator2Ctrl();

	// My members
	void MyOnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid);
	void GetIndicatorString(char *str);
	void GetTemperature(char *str);
	void GetAngle(char *str);
	void GetDDMMSS(char *str);
	void GetDDMM(char *str);
	void GetDD(char *str);
	void GetTime(char *str);
	double m_value;
	CFontHolder m_fontHeading;

	DECLARE_OLECREATE_EX(CIndicator2Ctrl)    // Class factory and guid
	DECLARE_OLETYPELIB(CIndicator2Ctrl)      // GetTypeInfo
	DECLARE_PROPPAGEIDS(CIndicator2Ctrl)     // Property page IDs
	DECLARE_OLECTLTYPE(CIndicator2Ctrl)		// Type name and misc status

// Message maps
	//{{AFX_MSG(CIndicator2Ctrl)
		// NOTE - ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

// Dispatch maps
	//{{AFX_DISPATCH(CIndicator2Ctrl)
	short m_precision;
	afx_msg void OnPrecisionChanged();
	CString m_units;
	afx_msg void OnUnitsChanged();
	short m_type;
	afx_msg void OnTypeChanged();
	OLE_COLOR m_indicatorColor;
	afx_msg void OnIndicatorColorChanged();
	short m_alignment;
	afx_msg void OnAlignmentChanged();
	short m_horizontal;
	afx_msg void OnHorizontalChanged();
	afx_msg double GetValue();
	afx_msg void SetValue(double newValue);
	afx_msg LPFONTDISP GetHeadingFont();
	afx_msg void SetHeadingFont(LPFONTDISP newValue);
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()

	afx_msg void AboutBox();

// Event maps
	//{{AFX_EVENT(CIndicator2Ctrl)
	//}}AFX_EVENT
	DECLARE_EVENT_MAP()

// Dispatch and event IDs
public:
	enum {
	//{{AFX_DISP_ID(CIndicator2Ctrl)
	dispidValue = 7L,
	dispidPrecision = 1L,
	dispidUnits = 2L,
	dispidType = 3L,
	dispidIndicatorColor = 4L,
	dispidHeadingFont = 8L,
	dispidAlignment = 5L,
	dispidHorizontal = 6L,
	//}}AFX_DISP_ID
	};
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_INDICATOR2CTL_H__12EBBB76_579B_4CCD_9497_0C9737E3A6A9__INCLUDED)
