cadview.h
来自「故障诊断工作涉及的领域相当广泛」· C头文件 代码 · 共 121 行
H
121 行
// CadView.h : interface of the CCadView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_CADVIEW_H__12E57A0F_ADD2_11CF_BF57_B29AF85F4C3B__INCLUDED_)
#define AFX_CADVIEW_H__12E57A0F_ADD2_11CF_BF57_B29AF85F4C3B__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "richtestDoc.h"
//class dpt;
class CCadView : public CView
{
int pflag;
ptlist* pptlst;
dpt olddpt;
BOOL bway;
BOOL bwaystart;
bp_net* pbnet;//占位变量
mygraph* pgraph;
BOOL bnest;//占位变量标志
BOOL bgraph;
BOOL bmousewheel;
BOOL firstext;
protected: // create from serialization only
CCadView();
double width;
double height;
DECLARE_DYNCREATE(CCadView)
dpt first;
dpt second;
public:
command** ppcmd;
unsigned int* cnt;
node* pn1;
node* pn2;
int which1;
int which2;
// Attributes
public:
CRichtestDoc* GetDocument();
//记录世界坐标与屏幕坐标的关系
double m_dOrgX,m_dOrgY;
double m_dWorldToScreen,m_dScreenToWorld;
//进行世界坐标与屏幕坐标变换
void WorldToScreen(CPoint& point,double x,double y);
void ScreenToWorld(double& x,double& y,CPoint& point);
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCadView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
void frcdraw();
BOOL draw_graph(int graphtype,CPoint point);
BOOL create_bp_net(int type,CPoint point);
void draw_bp_net(bp_net*,CPoint);
//绘制网格点
void DrawGrid(CDC* pDC);
virtual ~CCadView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
void ZoomWindow(CDC* pDC,BOOL bSure);
void DrawSys(CDC* pDC);
CPoint m_prePoint;
void DrawCursor(CDC* pDC,CPoint point);
//{{AFX_MSG(CCadView)
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
// afx_msg void OnLButtonClk(UINT nFlags, CPoint point);
afx_msg void OnRedraw();
afx_msg void OnSetDlg();
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
//}}AFX_MSG
afx_msg void OnDrawCommand(DWORD wParam,LPARAM lParam);
afx_msg void OnModifyCommand(DWORD wParam,LPARAM lParam);
afx_msg void OnOSnapCommand(DWORD wParam,LPARAM lParam);
afx_msg void OnZoomCommand(DWORD wParam,LPARAM lParam);
afx_msg void OnNotFinishCommand(DWORD wParam,LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in CadView.cpp
inline CCadDoc* CCadView::GetDocument()
{ return (CCadDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_CADVIEW_H__12E57A0F_ADD2_11CF_BF57_B29AF85F4C3B__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?