// PlanetsDlg.h : header file
//
//{{AFX_INCLUDES()
#include "webbrowser2.h"
#include "PlanetView.h"
//}}AFX_INCLUDES

#if !defined(AFX_PLANETSDLG_H__DBAE1B2E_9FF6_11D6_BF44_444553540000__INCLUDED_)
#define AFX_PLANETSDLG_H__DBAE1B2E_9FF6_11D6_BF44_444553540000__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CPlanetsDlg dialog

class CPlanetsDlg : public CDialog
{
// Construction
public:
	CPlanetsDlg(CWnd* pParent = NULL);	// standard constructor
	~CPlanetsDlg();

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPlanetsDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	// Generated message map functions
	//{{AFX_MSG(CPlanetsDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnPlanetsExit();
	afx_msg void OnPlanetsEarth();
	afx_msg void OnPlanetsMoon();
	afx_msg void OnPlanetsMars();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void Layout();
	void LoadPlanetData(LPCSTR lpszColorFile, LPCSTR lpszTopographyFile, double heightRange);
	void SetPlanetRotation();
	void Render();


	// Dialog Data
	HICON m_hIcon;
	//{{AFX_DATA(CPlanetsDlg)
	enum { IDD = IDD_PLANETS_DIALOG };
	CScrollBar	m_rotateBar;
	CListBox	m_planetList;
	CStatic	m_planetDisplay;
	CWebBrowser2	m_planetInfo;
	//}}AFX_DATA

	BOOL m_initialized;
	HBITMAP m_planetCanvas;
	HBITMAP m_colorMap;
	HBITMAP m_topoMap;
	double m_heightRange;
	int m_rotationAngle;
	CPlanetView m_planetView;
    static const double m_pi;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PLANETSDLG_H__DBAE1B2E_9FF6_11D6_BF44_444553540000__INCLUDED_)
