?? sortview.h
字號:
// SortView.h : interface of the CSortView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_SORTVIEW_H__870ABE38_EC0B_4BA2_BCAA_2E9B2B826392__INCLUDED_)
#define AFX_SORTVIEW_H__870ABE38_EC0B_4BA2_BCAA_2E9B2B826392__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CData
{
public:
int key;
CRect rt;
COLORREF fillcolor;
COLORREF textcolor;
CData(){fillcolor=RGB(255,0,255);textcolor=RGB(0,0,255);}
void SetColor(COLORREF fillcol,COLORREF textcol)
{fillcolor=fillcol;textcolor=textcol;}
void SetRect( int xLeft, int yTop, int xRight, int yBottom );
void DrawFace(CDC* pDC);
};
class CSortView : public CView
{
private:
CData* predata;
CData* data;
CData** pdata;
CEdit m_edit1;
CEdit m_edit2;
protected: // create from serialization only
CSortView();
DECLARE_DYNCREATE(CSortView)
// Attributes
public:
int n;
BOOL m_IsRun;
CSortDoc* GetDocument();
void AutoInput();
void Show();
void ReDraw(int i,int flag);
void showij(int i,int j);
void QuickPassShow(int i,int j,int flag);
void HeapSortShow(int i,int j,int flag);
// Operations
public:
void Delay(DWORD D);
void InsertionSort();
void SelectionSort();
void BubbleSort();
int QuickPass(int low,int high);//第一趟快速排序
void QuickSort(int low,int high);//快速排序
void Filter(int i,int n);
void HeapSort(int n);
void Merge(int a[],int T[],int low,int mid,int high);
void MergePass(int a[],int T[],int length,int n);
void MergeSort(int a[],int n);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSortView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CSortView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CSortView)
afx_msg void OnInsertionsort();
afx_msg void OnBubblesort();
afx_msg void OnSelectionsort();
afx_msg void OnAutoinput();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnQuicksort();
afx_msg void OnHeapinput();
afx_msg void OnHeapsort();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in SortView.cpp
inline CSortDoc* CSortView::GetDocument()
{ return (CSortDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SORTVIEW_H__870ABE38_EC0B_4BA2_BCAA_2E9B2B826392__INCLUDED_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -