⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 caculator.h

📁 用VC编写的一个多功能图形界面计算器
💻 H
字号:
// Caculator.h : main header file for the CACULATOR application
//

#if !defined(AFX_CACULATOR_H__82D7AD2B_B5D9_45C7_B221_23DDE9A64A1E__INCLUDED_)
#define AFX_CACULATOR_H__82D7AD2B_B5D9_45C7_B221_23DDE9A64A1E__INCLUDED_

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

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"		// main symbols

/////////////////////////////////////////////////////////////////////////////
// CCaculatorApp:
// See Caculator.cpp for the implementation of this class
//

class CCaculatorApp : public CWinApp
{
public:
	CCaculatorApp();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCaculatorApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// Implementation

	//{{AFX_MSG(CCaculatorApp)
		// NOTE - the 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()
};


/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
// Caculator dialog

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

// Dialog Data
	//{{AFX_DATA(Caculator)
	enum { IDD = IDD_MAIN };
	CEdit	m_Show;
	CString	m_Str;
	//}}AFX_DATA


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

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(Caculator)
	afx_msg void OnExit();
	afx_msg void OnOne();
	afx_msg void OnTwo();
	afx_msg void OnThree();
	afx_msg void OnFour();
	afx_msg void OnFive();
	afx_msg void OnSix();
	afx_msg void OnSeven();
	afx_msg void OnEight();
	afx_msg void OnNine();
	afx_msg void OnPosneg();
	afx_msg void OnZero();
	afx_msg void OnDot();
	afx_msg void OnAdd();
	afx_msg void OnPlus();
	afx_msg void OnMutiply();
	afx_msg void OnDivid();
	virtual BOOL OnInitDialog();
	afx_msg void OnCancelMode();
	afx_msg void OnResult();
	afx_msg void OnLbrace();
	afx_msg void OnRbrace();
	afx_msg void OnBack();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void Match(int a);
	int E_();
	int F();
	int T_();
	int T();
	int E();
	int yylex();
	int Caculate();
	bool RbIleagal();
	bool LbIleagel();
	bool OpIleagel();
	bool begin;
	bool zeroOk;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CACULATOR_H__82D7AD2B_B5D9_45C7_B221_23DDE9A64A1E__INCLUDED_)
#define ADD 0
#define MUL 1
#define LBRACE 2
#define RBRACE 3
#define NUM 4
#define END 5
#define OTHER 6
#define SUB 7
#define DIV 8

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -