📄 demodynamiclistview.h
字号:
#if !defined(AFX_DemoDynamicListView_H__F2578414_6CC7_4114_9B52_4B282D6E47CC__INCLUDED_)
#define AFX_DemoDynamicListView_H__F2578414_6CC7_4114_9B52_4B282D6E47CC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DemoDynamicListView.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CDemoDynamicListView view
#include <Afxcview.h>
class CDemoDynamicListView : public CListView //演示视图部分
{
protected:
CDemoDynamicListView(); // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CDemoDynamicListView)
// Attributes
public:
int m_price[100];
int m_weight[100];
int m_x[100];//解向量
int m_n; //物体个数
int m_totalweight;
int m_top; //要移动物体的位置(竖直方向)
// Operations
public:
void Paint();
void SetX(int i);
void MoveObject();
void DrawObject();
void AddDemoData(int n,int m,int p[100], int w[100]);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDemoDynamicListView)
public:
virtual void OnInitialUpdate();
protected:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
//}}AFX_VIRTUAL
// Implementation
protected:
virtual ~CDemoDynamicListView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
// Generated message map functions
protected:
//{{AFX_MSG(CDemoDynamicListView)
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnPaint();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DemoDynamicListView_H__F2578414_6CC7_4114_9B52_4B282D6E47CC__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -