ccombobox.hpp
来自「bt848,bt878 a采集卡的探测」· HPP 代码 · 共 27 行
HPP
27 行
#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 + =
减小字号Ctrl + -
显示快捷键?