⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iconcombobox.h

📁 vc 和mapobjects地理信息系统组件开发 很有启发意义和参考价值
💻 H
字号:
/*
Module : ICONCOMBOBOX.H
Purpose: Defines the interface for 2 MFC classes
         to implement an icon selection combo box
Created: PJN / 2-08-1998
History: None

Copyright (c) 1998 by PJ Naughter.  
All rights reserved.

*/

#ifndef __ICONCOMBOBOX_H__
#define __ICONCOMBOBOX_H__

class CSmallIconComboBox : public CComboBox
{
public:
//Methods
  int  AddIcon(UINT nIconID);
	int  InsertIcon(int nIndex, UINT nIconID);
  int  DeleteIcon(int nIndex);
  UINT GetCurSelIcon() const;
	int  SetCurSelIcon(UINT nIconID);
  int  AddString(LPCTSTR lpszString);
  int  InsertString(int nIndex, LPCTSTR lpszString);
  int  DeleteString(int nIndex);


protected:
	//{{AFX_VIRTUAL(CSmallIconComboBox)
	virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	virtual void PreSubclassWindow();
	virtual void DeleteItem(LPDELETEITEMSTRUCT lpDeleteItemStruct);
	//}}AFX_VIRTUAL

	//{{AFX_MSG(CSmallIconComboBox)
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
	DECLARE_DYNAMIC(CSmallIconComboBox)
};


class CLargeIconComboBox : public CSmallIconComboBox
{
public:
	short m_iHeight;

public:
	void SetHeight(short iHeight);
//Methods
  int  AddIcon(UINT nIconID);
	int  InsertIcon(int nIndex, UINT nIconID);
  //other public methods for the class are derived from CSmallIconComboBox

protected:
	//{{AFX_VIRTUAL(CLargeIconComboBox)
	virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL

	//{{AFX_MSG(CLargeIconComboBox)
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
	DECLARE_DYNAMIC(CLargeIconComboBox)
};


//DDX Support
void DDX_CBIcon(CDataExchange* pDX, int nIDC, UINT& nIconID);


#endif //__ICONCOMBOBOX_H__

⌨️ 快捷键说明

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