sortedlistctrl.h

来自「The application wizard has created this 」· C头文件 代码 · 共 52 行

H
52
字号
#ifndef _SORTED_LIST_CTRL_H_
#define _SORTED_LIST_CTRL_H_

#include <vector>
#include "defines.h"
#include "SortedHeaderCtrl.h"
// CSortedListCtrl

class CSortedListCtrl : public CListCtrl
{
	DECLARE_DYNAMIC(CSortedListCtrl)
	CSortedHeaderCtrl m_HeaderCtrl;
	void SortColumn (int nCol, BOOL bAsc);
	BOOL IsAscSorted ();
	int GetSortedColumn();
	virtual void ReSortList()=0;
public:
	CSortedListCtrl();
	virtual ~CSortedListCtrl();
	virtual void init()=0;
protected:
	DECLARE_MESSAGE_MAP()
	virtual void PreSubclassWindow();
public:
	afx_msg void OnLvnColumnclick(NMHDR *pNMHDR, LRESULT *pResult);
};

/************************************************************************/
/*                             CPlayerTypeListCtrl                      */
/************************************************************************/
class CPlayerTypeListCtrl : public CSortedListCtrl
{
	std::vector<const player_type_t*> m_pTypes;
	double GetTypeValue(UINT nColumn,const player_type_t* pType);
	BOOL SetItemText(UINT nItem,const player_type_t* pType);
	virtual void ReSortList();
public:
	int InsertItem(UINT nItem,const player_type_t* pType);
	virtual void init();
};
/************************************************************************/
/*                            CStatListCtrl                             */
/************************************************************************/
class CStatListCtrl : public CSortedListCtrl
{
	UINT _Data[MAX_PLAYER][9]; // 存储数据
	virtual void ReSortList();
public:
	virtual void init();
	void addLine(UINT nUnum,UINT nPas,UINT nCmp,UINT nSho,UINT nOn,UINT nDrb,UINT nCmd,UINT nInt,UINT nCmi);
};
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?