📄 heapsortview.h
字号:
// HeapSortView.h : interface of the CHeapSortView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_HEAPSORTVIEW_H__4B440B00_FB4C_4638_A1E3_4C0568A85E4E__INCLUDED_)
#define AFX_HEAPSORTVIEW_H__4B440B00_FB4C_4638_A1E3_4C0568A85E4E__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/*My own definition*/
#include "Heap.h"
#define R 15
#define TextR 8
#define X 0
#define Y -15
const int Text = 20;
//int linewide = 1;
//COLORREF becol = RGB(0,116,167);
//COLORREF afcol = RGB(230,117,219);
/*Definition is finished*/
class CHeapSortView : public CView
{
protected: // create from serialization only
CHeapSortView();
DECLARE_DYNCREATE(CHeapSortView)
// Attributes
public:
CHeapSortDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHeapSortView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CHeapSortView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
/*我的定义*/
//判定菜单状态的参量
bool blicked;
bool started;
bool Createif;
int min_max;
//bool checked;
//定义结束
CRect rect;
int n ;
int m;//算法关键参量!
int linewide; //= 1;
COLORREF becol; //= RGB(0,116,167);
COLORREF afcol; //= RGB(230,117,219);
Heap heap;
void drawmap(CDC* hDC);
void siftmin(int k,int n);//升序
void siftmax(int k,int n);//降序
/*定义结束*/
protected:
//{{AFX_MSG(CHeapSortView)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnCreate();
afx_msg void OnCartoon();
afx_msg void OnUpdateCartoon(CCmdUI* pCmdUI);
afx_msg void OnMax();
afx_msg void OnUpdateMax(CCmdUI* pCmdUI);
afx_msg void OnMin();
afx_msg void OnUpdateMin(CCmdUI* pCmdUI);
afx_msg void OnNew();
afx_msg void OnUpdateCreate(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in HeapSortView.cpp
inline CHeapSortDoc* CHeapSortView::GetDocument()
{ return (CHeapSortDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HEAPSORTVIEW_H__4B440B00_FB4C_4638_A1E3_4C0568A85E4E__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -