netexplorerview.h
来自「一个windows系统下查看网络拓扑结构的程序」· C头文件 代码 · 共 85 行
H
85 行
// NetExplorerView.h : CNetExplorerView 类的接口
//
//
#include "DataSupport.h"
#include "propertydialog.h"
#include "NetExplorerDoc.h"
#pragma once
#define WM_REEXPLORER (WM_USER+212)
#define WM_DRAWTAIL (WM_USER+114)
#define WM_ENDEXPLORER (WM_USER+165)
class CNetExplorerView : public CScrollView
{
protected: // 仅从序列化创建
CNetExplorerView();
DECLARE_DYNCREATE(CNetExplorerView)
// 属性
public:
CNetExplorerDoc* GetDocument() const;
// 操作
public:
// 重写
public:
virtual void OnDraw(CDC* pDC); // 重写以绘制该视图
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // 构造后第一次调用
// 实现
public:
virtual ~CNetExplorerView();
bool ExplorerStop;
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// 生成的消息映射函数
protected:
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBeginExplorer();
afx_msg void OnSetParament();
LRESULT OnDrawTail(WPARAM wp, LPARAM lp);
LRESULT OnReExplorer(WPARAM wp, LPARAM lp);
LRESULT OnEndExplorer(WPARAM wp, LPARAM lp);
bool DrawRouter(RouterEnty * Router,int List);
int DrawRow[100];//用来表示每一列画到多少行了
virtual BOOL OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll = TRUE);
CPoint ReferencePoint;//用来记录用户区发生的变化
protected:
char *NetIpToString(u_long in)
{
static char output[12][3*4+3+1];
static short which;
u_char *p;
p = (u_char *)∈
which = (which + 1 == 12 ? 0 : which + 1);
sprintf(output[which], "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
return output[which];
}
public:
// 控制属性对话框的创建等
CPropertyDialog PropertyDialog;
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
void OnChildrenChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnPingAllHost();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
};
#ifndef _DEBUG // NetExplorerView.cpp 的调试版本
inline CNetExplorerDoc* CNetExplorerView::GetDocument() const
{ return reinterpret_cast<CNetExplorerDoc*>(m_pDocument); }
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?