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

📄 ccombobox.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
字号:
/*____________________________________________________________________________
		Copyright (C) 2002 PGP Corporation
        All rights reserved.

        $Id: CComboBox.h,v 1.3 2002/08/06 20:10:45 dallen Exp $
____________________________________________________________________________*/

#ifndef Included_CComboBox_h	// [
#define Included_CComboBox_h

#include "pgpClassesConfig.h"
#include "CWindow.h"

_PGP_BEGIN

// Class CComboBox

class CComboBox : public CWindow
{
public:
	CComboBox() { }
	CComboBox(HWND hWnd) : CWindow(hWnd) { }
	virtual ~CComboBox() { }

	PGPInt32	AddString(const char *s) const
	{
		return SendMessage(CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(s));
	}

	PGPInt32	DeleteString(PGPUInt32 i) const
	{
		return SendMessage(CB_DELETESTRING, i, 0);
	}

	PGPInt32	FindString(const char *string, PGPInt32 start = -1) const
	{
		return SendMessage(CB_FINDSTRING, start, 
			reinterpret_cast<LPARAM>(string));
	}

	PGPInt32	FindStringExact(const char *string, PGPInt32 start = -1) const
	{
		return SendMessage(CB_FINDSTRINGEXACT, start, 
			reinterpret_cast<LPARAM>(string));
	}

	PGPInt32	GetCount() const
	{
		return SendMessage(CB_GETCOUNT, 0, 0);
	}

	PGPInt32	GetCurSel() const
	{
		return SendMessage(CB_GETCURSEL, 0, 0);
	}

	PGPBoolean	GetExtendedUI() const
	{
		return (SendMessage(CB_GETEXTENDEDUI, 0, 0) ? TRUE : FALSE);
	}

	PGPUInt32	GetItemData(PGPInt32 index) const
	{
		return SendMessage(CB_GETITEMDATA, index, 0);
	}

	PGPInt32	GetLBText(PGPInt32 i, CString& text) const;

	PGPInt32	InsertString(PGPUInt32 i, const char *s) const
	{
		return SendMessage(CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(s));
	}

	void		ResetContent() const
	{
		SendMessage(CB_RESETCONTENT, 0, 0);
	}

	PGPInt32	SetCurSel(PGPInt32 i) const
	{
		return SendMessage(CB_SETCURSEL, i, 0);
	}

	PGPInt32	SetExtendedUI(PGPBoolean onOrOff) const
	{
		return SendMessage(CB_SETEXTENDEDUI, onOrOff, 0);
	}

	void		SetItemData(PGPInt32 index, PGPUInt32 data) const
	{
		SendMessage(CB_SETITEMDATA, index, data);
	}
};

_PGP_END

#endif	// ] Included_CComboBox_h

⌨️ 快捷键说明

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