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

📄 hexeditview.h

📁 二进制浏览、编辑的源程序
💻 H
字号:
////////////////////////////////////////////////////////////////////////////
//	File:		HexEditView.h 
//	Version:	1.0.0.0
//	Created:	17-Oct-2003
//
//	Author:		Cuick
//	E-mail:		Cuick@163.net
//
//	You are free to use or modify this code .
////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_HEXEDITVIEW_H__964CEE2F_AB52_413E_9456_B463463AE57D__INCLUDED_)
#define AFX_HEXEDITVIEW_H__964CEE2F_AB52_413E_9456_B463463AE57D__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CHexEditView view

class CHexEditView : public CView
{
protected:
	CHexEditView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CHexEditView)

// Attributes
public:
	int m_CharCount;
// Operations
public:
	
	void SetText(char *input, int len);
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CHexEditView)
	public:
	virtual void OnInitialUpdate();
	protected:
	virtual void OnDraw(CDC* pDC);      // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CHexEditView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
protected:
	void ChangeLeft();
	void ChangeTop();
	BOOL m_bFirst;
	UINT m_PageRows;				//一页的行数
	UINT m_PageCols;
	UINT m_Rows;					//总的行数
	int m_TopLine;					//最上面的行
	int m_LeftChar;					//最左面的列
	

	void GetPageRowCols();
	
	void SetHorzScrollBar();
	void SetVertScrollBar();
	UINT Point2Pos(CPoint point);

	BOOL m_StartDrag;
	BOOL m_bFocused;

	int m_TextStart;
	int m_HexStart;

	int m_LineHeight;				//行高
	int m_CharWidth;				//字符宽度
	

	int m_SelStart, m_SelEnd, m_oriStart;		//被选中的字符串

	
	char* m_text;
	//{{AFX_MSG(CHexEditView)
	afx_msg void OnSetFocus(CWnd* pOldWnd);
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
	afx_msg void OnCharLeft();
	afx_msg void OnCharRight();
	afx_msg void OnLineUp();
	afx_msg void OnLineDown();
	
};

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

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

#endif // !defined(AFX_HEXEDITVIEW_H__964CEE2F_AB52_413E_9456_B463463AE57D__INCLUDED_)

⌨️ 快捷键说明

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