📄 readonlycombobox.h
字号:
#if !defined(AFX_READONLYCOMBOBOX_H__11768645_6CBA_11D4_9754_00508B5ECE69__INCLUDED_)
#define AFX_READONLYCOMBOBOX_H__11768645_6CBA_11D4_9754_00508B5ECE69__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ReadOnlyComboBox.h : header file
//
// The resource for this read only combo box needs to have the following properties set:
// Type: Dropdown
// Owner Draw: Fixed
// Has Strings: Checked
/////////////////////////////////////////////////////////////////////////////
// CReadOnlyComboBox window
class CReadOnlyComboBox : public CComboBox
{
// Construction
public:
CReadOnlyComboBox();
virtual ~CReadOnlyComboBox();
// Operations
public:
// Call AddString to add items like normal CComboBox::AddString().
// The first string added will editable. The following added strings
// will be read only.
int AddString(const CString& strItem);
// Call SetNumbersOnly if users should be restricted to only be allowed to enter numbers.
// Any kind of strings can still be added.
void SetNumbersOnly();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CReadOnlyComboBox)
public:
//}}AFX_VIRTUAL
// Generated message map functions
protected:
//{{AFX_MSG(CReadOnlyComboBox)
afx_msg void OnSelchange();
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
afx_msg void OnEditupdate();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_READONLYCOMBOBOX_H__11768645_6CBA_11D4_9754_00508B5ECE69__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -