📄 itemlist.h
字号:
//PK 2006/11/22 - 2007/03/07
#pragma once
#include "stdafx.h"
#include "OwnerDrawnListViewCtrl.h"
#include "global.h"
class CRecords;
class CBook;
class CItem;
class CItemList : public COwnerDrawnListViewCtrl<CItemList>
{
public:
BEGIN_MSG_MAP(CItemList)
CHAIN_MSG_MAP(COwnerDrawnListViewCtrl<CItemList>)
END_MSG_MAP()
void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
void records(CRecords * records) { _records = records; }
void set_book(CBook * book) { _books.push_back(book); }
bool init();
CItem * get_item(int index);
CItem * get_current_item();
void add_an_item(CItem * item, bool tail = true);
void update_an_item(int index, CItem * item);
void sort_list();
void update_book_name(CBook * book);
void delete_book(CBook * book);
void add_book(CBook * book);
private:
static int CALLBACK _ListCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
private:
typedef vector<CBook *> t_book;
t_book _books;
CRecords * _records;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -