imagelistbox.h

来自「vc的一些原码,对于帮助学习和提高很有帮助」· C头文件 代码 · 共 66 行

H
66
字号
#if !defined(AFX_IMAGELISTBOX_H__E7AB17F0_707B_11D4_85D1_00A0CC253EAC__INCLUDED_)
#define AFX_IMAGELISTBOX_H__E7AB17F0_707B_11D4_85D1_00A0CC253EAC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ImageListBox.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CImageListBox window

#include	"afxtempl.h"

struct LISTIMAGEDATA
	{
	int		nItem;
	int		nImage;
	CString	Text;
	};

class CImageListBox : public CListBox
{
// Construction
public:
	CImageListBox();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CImageListBox)
	public:
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
	//}}AFX_VIRTUAL

// Implementation
public:
	int AddItem (LISTIMAGEDATA &ld);
	void SetImageList (CImageList *pImages);
	virtual ~CImageListBox();

	// Generated message map functions
protected:
	CImageList *m_pImages;
	//{{AFX_MSG(CImageListBox)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()

	CList<LISTIMAGEDATA, LISTIMAGEDATA&>	m_ListData;
};

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

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

#endif // !defined(AFX_IMAGELISTBOX_H__E7AB17F0_707B_11D4_85D1_00A0CC253EAC__INCLUDED_)

⌨️ 快捷键说明

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