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

📄 ccombobox.hpp

📁 bt848,bt878 a采集卡的探测
💻 HPP
字号:
#ifndef _CCOMBOBOX_HPP
#define _CCOMBOBOX_HPP

#include "CWnd.hpp"
#include "CString.hpp"

class CComboBox : public CWnd {
public:
	// Constructors
	CComboBox() {}
	CComboBox(CWnd& father,int nID) : CWnd(father,nID) {}

	// This seems to be very useful
	CComboBox& operator=(LPTSTR txt) { SetText(txt); return *this; }
	CComboBox& operator=(CString& txt) { SetText(txt); return *this; }
	// To limit text length
	void SetLimitText(int max) { SendMessage(EM_SETLIMITTEXT,(WPARAM)max*sizeof(TCHAR),(LPARAM)0);}

	// Useful fns
	void SetCurSel(UINT Sel) { SendMessage(CB_SETCURSEL,(WPARAM) Sel,(LPARAM)0); }
	UINT GetCurSel() { return SendMessage(CB_GETCURSEL,(WPARAM) 0,(LPARAM)0); }
	void AddString(LPTSTR String) { SendMessage(CB_ADDSTRING,(WPARAM)0,(LPARAM)String); }
	void AddString(CString& String) { SendMessage(CB_ADDSTRING,(WPARAM)0,(LPARAM)String.Ptr()); }
};

#endif

⌨️ 快捷键说明

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