// CameraPosWnd.h :  Header file
//

#if !defined(AFX_CAMERAPOSWND_H__2F3C4B89_2DAE_4AA3_AA49_A91FCA26C39A__INCLUDED_)
#define AFX_CAMERAPOSWND_H__2F3C4B89_2DAE_4AA3_AA49_A91FCA26C39A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


// Position calculation structure
typedef	struct {
	int		min;		// A minimum angle (downward direction)
	int		max;		// A maximum angle (upward direction)
	int		pos_0;		// The angle of the origin
} CameraPosRec;

/////////////////////////////////////////////////////////////////////////////
// CCameraPosWnd Window

class CCameraPosWnd : public CWnd
{
// Construction
public:
	CCameraPosWnd(CWnd* pParent = NULL);


public:
	//{{AFX_VIRTUAL(CCameraPosWnd)
	protected:
	virtual LRESULT DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

//  Implementation
public:
	void GetMousePos(CPoint mousePos,UINT posture,CPoint &pos);
	void SetCameraPos(CPoint pos,UINT posture);
	void SetBallPos( CPoint pos );
	virtual ~CCameraPosWnd();
	CWnd* m_pParent;

protected:
	void CalcPosition( CPoint angle,UINT posture,CPoint &pos );
	CPoint m_CameraPos;
	CPoint m_ballPos;

	// Generated message map functions
	//{{AFX_MSG(CCameraPosWnd)
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnPaint();
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}

#endif // !defined(AFX_CAMERAPOSWND_H__2F3C4B89_2DAE_4AA3_AA49_A91FCA26C39A__INCLUDED_)
