Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Calculator

, 9 Jun 2003
Calculator using MFC, Dialog based application.
calculater_demo.zip
dialog_based
dialog_based.clw
dialog_based.dsp
dialog_based.dsw
arrowcop.cur
res
dialog_based.ico
Reign Find.ico
HardLine Workgroup.ico
See Control Panel.ico
exe.zip
dialog_based.exe
// dialog_basedDlg.h : header file
//

#if !defined(AFX_DIALOG_BASEDDLG_H__38D61B53_45A6_4D9E_8F60_29C7C9012197__INCLUDED_)
#define AFX_DIALOG_BASEDDLG_H__38D61B53_45A6_4D9E_8F60_29C7C9012197__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CDialog_basedDlg dialog

class CDialog_basedDlg : public CDialog
{
// Construction
public:
	void Equal2();
	CDialog_basedDlg(CWnd* pParent = NULL);	// standard constructor
void CDialog_basedDlg::AddDigit(char numKey);

// Dialog Data
	//{{AFX_DATA(CDialog_basedDlg)
	enum { IDD = IDD_DIALOG_BASED_DIALOG };
	CEdit	m_control_e;
	BOOL	m_inv;
	BOOL	m_hp;
	double	m_num;
	CString	m_sd;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;
    long	double m_op1,m_op2,m_result;
	int m_operation;
	int i,s;
	long double r;
	long double m_m;
	long double  data[50];
	bool st1,st2;
	bool pflag;
	long double p;
//	CKeyBoard * m_pkey;
	// Generated message map functions
	//{{AFX_MSG(CDialog_basedDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnAdd();
	afx_msg void OnSubtract();
	afx_msg void OnEqual();
	afx_msg void Onsin();
	afx_msg void Oncos();
	afx_msg void Ontan();
	afx_msg void Onlog();
	afx_msg void Onln();
	afx_msg void Oninv();
	afx_msg void OnHp();
	afx_msg void Ondevide();
	afx_msg void Onclear();
	afx_msg void Onmul();
	afx_msg void Onfactoriel();
	afx_msg void OnM();
	afx_msg void OnMm();
	afx_msg void OnMr();
	afx_msg void Onpow();
	afx_msg void Onx2();
	afx_msg void Onx3();
	afx_msg void Onpi();
	afx_msg void OnMc();
	afx_msg void OnChangeEdit1();
	afx_msg void Onb1();
	afx_msg void Onclear2();
	afx_msg void Onb2();
	afx_msg void Onb3();
	afx_msg void Onb4();
	afx_msg void Onb5();
	afx_msg void Onb6();
	afx_msg void Onb7();
	afx_msg void Onb8();
	afx_msg void Onb9();
	afx_msg void Onb10();
	afx_msg void Onbp();
	afx_msg void OnOr();
	afx_msg void On1x();
	afx_msg void Onbp2();
	afx_msg void Onst2();
	afx_msg void Onstat();
	afx_msg void Ondata();
	afx_msg void Onsum();
	afx_msg void Ons();
	afx_msg void OnDate();
	afx_msg void Onroot();
	afx_msg void Onroot2();
	afx_msg void Onbsp();
	afx_msg void OnAnd();
	afx_msg void OnXor();
	afx_msg void OnMOd();
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnClose();
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnClos();
	afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_DIALOG_BASEDDLG_H__38D61B53_45A6_4D9E_8F60_29C7C9012197__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Tahir Naeem

Unknown
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141220.1 | Last Updated 10 Jun 2003
Article Copyright 2002 by Tahir Naeem
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid