📄 sourcemonitor.h
字号:
#if !defined(AFX_SOURCEMONITOR_H__A8DE56F3_5383_11D3_92D5_0080C8E20453__INCLUDED_)
#define AFX_SOURCEMONITOR_H__A8DE56F3_5383_11D3_92D5_0080C8E20453__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SourceMonitor.h : header file
//
#include "stdafx.h"
#define ID_TOOLBAR 112
#define ID_TOOLBAR_STEP 113
#define ID_TOOLBAR_BREAKPOINT 114
#define ID_TOOLBAR_STEPOVER 115
#define ID_TOOLBAR_EDIT 116
#define ID_TOOLBAR_QUERY 117
#define ID_TOOLBAR_EDITFIND 118
#define ID_TOOLBAR_FIND 119
#define ID_TOOLBAR_NEXTCHANNEL 119
#define ID_TOOLBAR_PREVIOUSCHANNEL 120
#define ID_STATUSBAR 130
#define ID_EDIT_SOURCEWINDOW 111
#define EDITTYPE_QUERY 1
#define EDITTYPE_FIND 2
/////////////////////////////////////////////////////////////////////////////
// CMyEdit window
class CMyEdit : public CEdit
{
// Construction
public:
CMyEdit();
// Attributes
public:
int m_iType;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyEdit)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyEdit();
// Generated message map functions
protected:
//{{AFX_MSG(CMyEdit)
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// CMyToolBarCtrl control
#define WINDOW_CAPTION "脚本监视器"
class CMyToolBarCtrl : public CToolBarCtrl
{
// Construction
public:
CMyToolBarCtrl();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyToolBarCtrl)
//}}AFX_VIRTUAL
// Implementation
public:
CMyEdit m_Edit, m_Edit_Find;
int Create(CWnd *pParentWnd, RECT rectToolBarCtrl, UINT uID);
int Create2(CWnd *pParentWnd, RECT rectToolBarCtrl, UINT uID);
virtual ~CMyToolBarCtrl();
// Generated message map functions
protected:
//{{AFX_MSG(CMyToolBarCtrl)
// NOTE - the ClassWizard will add and remove member functions here.
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//end of CMyToolBarCtrl control
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// CSourceMonitor frame
class CSourceMonitor : public CFrameWnd
{
DECLARE_DYNCREATE(CSourceMonitor)
protected:
// Attributes
public:
//UI类成员
CEdit m_Edit;
CMyToolBarCtrl m_toolBarCtrl;
CFont m_font;
CStatusBarCtrl m_statusBarCtrl;
int m_iHeightOfToolBar;
int m_iHeightOfStatusBar;
BOOL m_bIsStep, m_bIsBreakPoint;
HANDLE m_hEventStep; //单步运行事件
HANDLE m_hEventQuery; //查询事件
int m_iCurSelLineNo;
int m_iIndicatorAreaWidth; //指示区宽度
CPtrList m_ptrListBreakPointIID; //无用
CPtrList m_ptrListBreakPointLineNo;
char m_aszFileName[100];
char *m_szFileBuf;
DWORD m_dwFileBufSize;
HWND m_hwndEdit;
HICON m_hIndexIcon;
//窗口的规格
int m_iEditX;
int m_iEditY;
int m_iLineX;
int m_iLineY;
int m_iLineHeight;
int m_iCurrentY;
//和VSINTERPRETER的共享变量
char m_szQueryVariableName[100]; //SOURCEMONITOR向VSINTERPRETER查询的变量名
int m_iQueryVariableType; //VSINTERPRETER返回的变量的类型
char m_szQueryVariableValue[8096]; //VSINTERPRETER返回的字符串变量的值
int m_iQueryVariableValue; //VSINTERPRETER返回的整型变量的值
float m_fQueryVariableValue; //VSINTERPRETER返回的浮点型变量的值
int m_iChannelNo; //对应的通道号(1开始)(为了每个窗口对应一个通道)
void *m_pvsInterpreter;
// Operations
public:
int SetMonitorData(int iChannelNo, struct CurrentState *pcurrentState);
int FindString(char *szString);
int DisplyQueryValue();
BOOL IsBreakPointLine(int iLineNo, int *piIndex);
int UpdateSymbolArea();
int ToggleBreakPoint();
CSourceMonitor(); // protected constructor used by dynamic creation
virtual ~CSourceMonitor();
int Refresh();
int SelectLine(int iLineNo);
int SelectLine(char *IID, int iKeyIndex);
int LoadFile(char *szInstructionFile, int iChannelNo);
int Run(char *szInstructionFile, int iChannelNo);
int SetChannelNo(int iChannelNo);
BOOL Create(void *pvsInterpreter);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSourceMonitor)
public:
virtual BOOL OnChildNotify(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pLResult);
protected:
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CSourceMonitor)
afx_msg void OnPaint();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnToolBarNotify( NMHDR * pNotifyStruct, LRESULT * result );
afx_msg void OnEditScroll();
afx_msg void OnClose();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SOURCEMONITOR_H__A8DE56F3_5383_11D3_92D5_0080C8E20453__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -