NT nFlags, CPoint point);
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
afx_msg void OnKillFocus(CWnd* pNewWnd);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
file://}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
// CACComboBox window
class CACComboBox : public CComboBox
{
private:
CEdit* m_pEdit;
// Construction
public:
CACComboBox();
// Attributes
public:
CWndForACComboBox m_wndList;
inline void WindowMove(void)
{
if(IsWindow(m_wndList.GetSafeHwnd()))
m_wndList.Invalidate(FALSE);
}
// Operations
public:
virtual void HandleCompletion();
// Overrides
// ClassWizard generated virtual function overrides
file://{{AFX_VIRTUAL(CACComboBox)
protected:
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
virtual void PreSubclassWindow();
file://}}AFX_VIRTUAL
// Implementation
public:
virtual ~CACComboBox();
// Generated message map functions
protected:
file://{{AFX_MSG(CACComboBox)
afx_msg void OnKillfocus();
afx_msg void OnSelchange();
file://}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
file://{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_ACCOMBOBOX_H__81CBBD04_3955_4076_A688_74D3EA9730D9__INCLUDED_)
file://-----------------------------------------------------------------------------
// File: ACComboBox.cpp
//
// Desc:
// 根据用户在编辑框里已经输入的单词,从组合框的列表选项过滤出匹配的项,并使用下拉列表显示出来以供用户选择
//
// Copyright (c) 2001 EagleFly Studio.
//
// Original Author: Zhengpeng.Lan
// Author:
//
// Create Time: 2001/10/10
// Modify Time: 2001/10/11
//
file://-----------------------------------------------------------------------------
#include "stdafx.h"
#include "ACComboBox.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CACComboBox
CACComboBox::CACComboBox()
:CComboBox()
{
m_pEdit = NULL;
}
CACComboBox::~CACComboBox()
{
if(m_pEdit)
delete m_pEdit;
}
BEGIN_MESSAGE_MAP(CACComboBox, CComboBox)
file://{{AFX_MSG_MAP(CACComboBox)
ON_CONTROL_REFLECT(CBN_KILLFOCUS, OnKillfocus)
ON_CONTROL_REFLECT(CBN_SELCHANGE, OnSelchange)
file://}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CACComboBox message handlers
/////////////////////////////////////////////////////////////////////////////
// CWndForACComboBox
CWndForACComboBox::CWndForACComboBox()
:CWnd()
{
lpWndCls = AfxRegisterWndClass(0);
m_p