对列表进行数据写入
CListUI
对列表进行操作的类
class UILIB_API CListUI : public CVerticalLayoutUI, public IListUI
{
public:
CListUI();
LPCTSTR GetClass() const;
UINT GetControlFlags() const;
LPVOID GetInterface(LPCTSTR pstrName);
bool GetScrollSelect();
void SetScrollSelect(bool bScrollSelect);
int GetCurSel() const;
bool SelectItem(int iIndex, bool bTakeFocus = false);
CListHeaderUI* GetHeader() const;
CContainerUI* GetList() const;
TListInfoUI* GetListInfo();
CControlUI* GetItemAt(int iIndex) const;
int GetItemIndex(CControlUI* pControl) const;
bool SetItemIndex(CControlUI* pControl, int iIndex);
int GetCount() const;
bool Add(CControlUI* pControl);
bool AddAt(CControlUI* pControl, int iIndex);
bool Remove(CControlUI* pControl);
bool RemoveAt(int iIndex);
void RemoveAll();
void EnsureVisible(int iIndex);
void Scroll(int dx, int dy);
int GetChildPadding() const;
void SetChildPadding(int iPadding);
void SetItemFont(int index);
void SetItemTextStyle(UINT uStyle);
void SetItemTextPadding(RECT rc);
void SetItemTextColor(DWORD dwTextColor);
void SetItemBkColor(DWORD dwBkColor);
void SetItemBkImage(LPCTSTR pStrImage);
void SetAlternateBk(bool bAlternateBk);
void SetSelectedItemTextColor(DWORD dwTextColor);
void SetSelectedItemBkColor(DWORD dwBkColor);
void SetSelectedItemImage(LPCTSTR pStrImage);
void SetHotItemTextColor(DWORD dwTextColor);
void SetHotItemBkColor(DWORD dwBkColor);
void SetHotItemImage(LPCTSTR pStrImage);
void SetDisabledItemTextColor(DWORD dwTextColor);
void SetDisabledItemBkColor(DWORD dwBkColor);
void SetDisabledItemImage(LPCTSTR pStrImage);
void SetItemLineColor(DWORD dwLineColor);
bool IsItemShowHtml();
void SetItemShowHtml(bool bShowHtml = true);
RECT GetItemTextPadding() const;
DWORD GetItemTextColor() const;
DWORD GetItemBkColor() const;
LPCTSTR GetItemBkImage() const;
bool IsAlternateBk() const;
DWORD GetSelectedItemTextColor() const;
DWORD GetSelectedItemBkColor() const;
LPCTSTR GetSelectedItemImage() const;
DWORD GetHotItemTextColor() const;
DWORD GetHotItemBkColor() const;
LPCTSTR GetHotItemImage() const;
DWORD GetDisabledItemTextColor() const;
DWORD GetDisabledItemBkColor() const;
LPCTSTR GetDisabledItemImage() const;
DWORD GetItemLineColor() const;
void SetMultiExpanding(bool bMultiExpandable);
int GetExpandedItem() const;
bool ExpandItem(int iIndex, bool bExpand = true);
void SetPos(RECT rc);
void DoEvent(TEventUI& event);
void SetAttribute(LPCTSTR pstrName, LPCTSTR pstrValue);
IListCallbackUI* GetTextCallback() const;
void SetTextCallback(IListCallbackUI* pCallback);
SIZE GetScrollPos() const;
SIZE GetScrollRange() const;
void SetScrollPos(SIZE szPos);
void LineUp();
void LineDown();
void PageUp();
void PageDown();
void HomeUp();
void EndDown();
void LineLeft();
void LineRight();
void PageLeft();
void PageRight();
void HomeLeft();
void EndRight();
void EnableScrollBar(bool bEnableVertical = true, bool bEnableHorizontal = false);
virtual CScrollBarUI* GetVerticalScrollBar() const;
virtual CScrollBarUI* GetHorizontalScrollBar() const;
BOOL SortItems(PULVCompareFunc pfnCompare, UINT_PTR dwData);
protected:
bool m_bScrollSelect;
int m_iCurSel;
int m_iExpandedItem;
IListCallbackUI* m_pCallback;
CListBodyUI* m_pList;
CListHeaderUI* m_pHeader;
TListInfoUI m_ListInfo;
};