listnew.h

来自「模拟迅雷的下载工具软件」· C头文件 代码 · 共 77 行

H
77
字号
#if !defined(AFX_LISTNEW_H__72E264B5_43C8_11D9_95EE_00E04CB27B6F__INCLUDED_)
#define AFX_LISTNEW_H__72E264B5_43C8_11D9_95EE_00E04CB27B6F__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ListNew.h : header file
//作者:孟庆远


/////////////////////////////////////////////////////////////////////////////
// CListNew window
#define WM_LISTINFO  WM_USER+105

typedef struct tagLIST_INFO{
	int nItem;
	int nSubItem;
}LIST_INFO;

class CListNew : public CListCtrl
{
// Construction
public:
	CListNew();

// Attributes
public:
	CWnd *m_pParentWnd;     //Parent Wnd
	UINT m_nMenuID;
	CImageList m_ImageList;

	int m_nItem;           //Current Row
	int m_nSubItem;        //Current Col
	
// Operations
public:
	BOOL CreateNew(CWnd *pParentWnd,CRect nRect,UINT nID,UINT nMenuID,UINT nBitmapID=-1,int nImageListType=LVSIL_SMALL);
	void SetCurrentRow(int nItem);
	void SetCurrentCol(int nCol);
	int GetCurrentRow();
	int GetCurrentCol();
	void SetDefaultTitle();

	void SetItemColumnValueA(int nItem,int nSubItem,char *cText[],int nImage=0);
	void SetItemValue(int nItem,int nImage=0);
	void SetItemColumnValue(int nItem,int nSubItem,LPCTSTR szText);
	void SetItemColumnValueB(int nItem,int nSubItem,LPTSTR cText[],int nImage);
	void SetAutoSize(int nStartNum,int nCount);

	BOOL PopupMenu(int iItem,int iSubItem,CRect *rRect=NULL);


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CListNew)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CListNew();

	// Generated message map functions
protected:
	//{{AFX_MSG(CListNew)
	afx_msg void OnRclick(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_LISTNEW_H__72E264B5_43C8_11D9_95EE_00E04CB27B6F__INCLUDED_)

⌨️ 快捷键说明

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