// CalculatorUI.h : header file
//

#if !defined(AFX_CALCULATORUI_H__800D15C9_83E8_40D8_84F0_5B7D531D28B7__INCLUDED_)
#define AFX_CALCULATORUI_H__800D15C9_83E8_40D8_84F0_5B7D531D28B7__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CCalculatorUI dialog

class Calculator;
class CCalculatorUI : public CDialog
{
private:
	void initDataMember();
	void OnNumberKey(CString s);
	void doCalculation();
	void saveBuffer();
	CString m_buffer;
	BOOL m_unaryOperand;
	CString m_acummulationBuffer;
	int m_operationID;
	BOOL m_opKeyPressed;
	BOOL m_opEqualJustPressed;
	BOOL m_overflowError;
	Calculator *engine;
// Construction
public:
	CCalculatorUI(CWnd* pParent = NULL);	// standard constructor
	virtual ~CCalculatorUI();

// Dialog Data
	//{{AFX_DATA(CCalculatorUI)
	enum { IDD = IDD_CALCULATOR_DIALOG };
	CEdit	m_viewControl;
	CString	m_view;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CCalculatorUI)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void On0();
	afx_msg void On1();
	afx_msg void On2();
	afx_msg void On3();
	afx_msg void On4();
	afx_msg void On5();
	afx_msg void On6();
	afx_msg void On7();
	afx_msg void On8();
	afx_msg void On9();
	afx_msg void OnSign();
	afx_msg void OnClear();
	afx_msg void OnPlus();
	afx_msg void OnMinus();
	afx_msg void OnEquals();
	afx_msg void OnMultiply();
	afx_msg void OnDivide();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_CALCULATORUI_H__800D15C9_83E8_40D8_84F0_5B7D531D28B7__INCLUDED_)
