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

📄 executeview.h

📁 这个也是我们的毕业设计课题
💻 H
字号:
#if !defined(AFX_EXECUTEVIEW_H__75443016_BD40_496F_B864_0748DE981F64__INCLUDED_)
#define AFX_EXECUTEVIEW_H__75443016_BD40_496F_B864_0748DE981F64__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ExecuteView.h : header file
#include "VariableDlg.h"
#include "DFY\type.h"
/////////////////////////////////////////////////////////////////////////////
// CExecuteView view

class CExecuteView : public CScrollView
{
protected:
	CExecuteView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CExecuteView)

// Attributes
public:

// Operations
public:
	void SetIP(WORD wIP);
	void AddVarInfo(char* strVarName,UNSHORT uAddr);
	void ResetVarInfo();
	void DrawFlag(POINT point);
	CString ChangeToHexStr(UNSHORT wData);
	void SetCodeSegSize(WORD uCodeSegSize);//set the code segment size
	void SetProExistState(BOOL bProExist);
	void SetFirstVisualPos(UNSHORT);//set the first visual position
	void ResetContent();//reset the content of m_strInstruction
	void AddContent(CString str);//add content to the m_strInstruion
	void FlushDisplay();//flush the display
	
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CExecuteView)
	protected:
	virtual void OnDraw(CDC* pDC);      // overridden to draw this view
	virtual void OnInitialUpdate();     // first time after construct
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
	//}}AFX_VIRTUAL
private:
	WORD m_wPC1;
	WORD m_wGR[5];
	DWORD m_dwOP;
	WORD m_wFLAGS;
	WORD m_wSP;
	WORD m_wVarNum;
	VarInfo m_varInfo[2048];
	void AnylizeCode();
	WORD m_wPC;//reserve the current PC value
	BOOL m_bProExist;
	CPoint m_caretPos;//the current caret pos
	CBitmap* m_pBitmapArrow;//used to hold the 
	CString m_strInstruction[2048];//support 2048 instructions
			//if you want support more instruction
			//you should make the number max
	UNSHORT m_uProCount;//the program counter
	WORD m_wCodeSegSize;//the code segment size
	UNSHORT m_uIP;//the IP
	void ReportState(CString strState);
	void ShowVariable(CDC* pDC);
	void ShowRegisters(CDC* pDC);//show the registers
	UNSHORT m_uContentNum;//the content number
	UNSHORT m_uScrollRange;//the scrollrange
	UNSHORT m_uFirstVisualPos;//the first visual line pos
// Implementation
protected:
	virtual ~CExecuteView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
	//{{AFX_MSG(CExecuteView)
	afx_msg void OnPaint();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnExcute();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnStop();
	afx_msg void OnDestroy();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

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

#endif // !defined(AFX_EXECUTEVIEW_H__75443016_BD40_496F_B864_0748DE981F64__INCLUDED_)

⌨️ 快捷键说明

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