📄 mychview.h
字号:
// MyCHView.h : interface of the CMyCHView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MYCHVIEW_H__84C2BBA3_585F_4784_B689_F17698BEFFA4__INCLUDED_)
#define AFX_MYCHVIEW_H__84C2BBA3_585F_4784_B689_F17698BEFFA4__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CMyCHView : public CView
{
protected: // create from serialization only
CMyCHView();
DECLARE_DYNCREATE(CMyCHView)
// Attributes
public:
CMyCHDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMyCHView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMyCHView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CMyCHView)
afx_msg void OnIniData();
afx_msg void OnConvexhull();
afx_msg void OnUpdateConvexhull(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
int m_nCount; // 总的随机点数目
CPoint m_topLeft; // 区域左上角位置
CSize m_sScreen; // 区域大小
int m_nodeStyle; // 随机点风格
int m_r; // 点的大小
int m_h; // 凸包顶点数目
CPoint *m_pNode; // 随机点数组
CPoint *m_pResult; // 计算结果(凸包顶点)数组
BOOL IsInitialed; // 是否已经初始化,并分配过内存
BOOL IsComputed; // 是否计算完毕。
public:
void ConvexHull(); // 计算凸包
};
#ifndef _DEBUG // debug version in MyCHView.cpp
inline CMyCHDoc* CMyCHView::GetDocument()
{ return (CMyCHDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MYCHVIEW_H__84C2BBA3_585F_4784_B689_F17698BEFFA4__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -