📄 extend~1.h
字号:
#if !defined(AFX_EXTENDEDCOMBOBOX_H__4E62425F_6B13_11D4_BD73_000021479D21__INCLUDED_)
#define AFX_EXTENDEDCOMBOBOX_H__4E62425F_6B13_11D4_BD73_000021479D21__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ExtendedComboBox.h : header file
//
class CExtendedComboBox;
/////////////////////////////////////////////////////////////////////////////
// CListBoxInsideComboBox window
class CListBoxInsideComboBox : public CWnd
{
// Construction
public:
CListBoxInsideComboBox();
// Attributes
public:
CExtendedComboBox *m_Parent;
void SetParent(CExtendedComboBox *);
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CListBoxInsideComboBox)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CListBoxInsideComboBox();
// Generated message map functions
protected:
//{{AFX_MSG(CListBoxInsideComboBox)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// CExtendedComboBox window
class CExtendedComboBox : public CComboBox
{
// Construction
public:
CExtendedComboBox();
// Attributes
public:
// default implementation uses LSB of item data; override to get other behaviour
virtual BOOL IsItemEnabled(UINT) const;
protected:
CString m_strSavedText; // saves text between OnSelendok and OnRealSelEndOK calls
CListBoxInsideComboBox m_ListBox;
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CExtendedComboBox)
public:
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMeasureItemStruct);
protected:
virtual void PreSubclassWindow();
virtual void PostNcDestroy();
//}}AFX_VIRTUAL
// Implementation
public:
void SetItemEnable(int nIndex,BOOL bEnable);
virtual ~CExtendedComboBox();
// Generated message map functions
protected:
//{{AFX_MSG(CExtendedComboBox)
afx_msg int OnCharToItem(UINT nChar, CListBox* pListBox, UINT nIndex);
afx_msg void OnSelendok();
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
//}}AFX_MSG
LRESULT OnCtlColor(WPARAM,LPARAM lParam);
afx_msg LRESULT OnRealSelEndOK(WPARAM,LPARAM);
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_EXTENDEDCOMBOBOX_H__4E62425F_6B13_11D4_BD73_000021479D21__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -