- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
AutoCompl.h
资源名称:酒店管理系统源代码.rar [点击查看]
上传用户:czfddz
上传日期:2013-03-20
资源大小:1517k
文件大小:2k
源码类别:
酒店行业
开发平台:
C/C++
- ////////////////////////////////////////////////////////////////
- // VCKBASE -- August 2000
- // Compiles with Visual C++ 6.0, runs on Windows 98 and probably NT too.
- //
- #pragma once
- #include "subclass.h"
- //////////////////
- // Generic auto-completion object you can use to do auto-completion
- // for edit and combobox controls
- //
- // To use:
- // - instantiate one of these for each edit/combobox you want to hook
- // - add some strings to the string array
- // - call Init
- //
- class CAutoComplete : public CSubclassWnd {
- protected:
- CStringArray m_arStrings; // list (array) of strings
- CString m_sPrevious; // previous content
- int m_bIgnoreChangeMsg; // ignore EN_CHANGE message?
- UINT m_idMyControl; // ID of control I am subclassing
- int m_iType; // type of control (edit/combo)
- int m_iCurString; // index to current string
- enum { Edit=1,ComboBox };
- // hook fn
- virtual LRESULT WindowProc(UINT msg, WPARAM wp, LPARAM lp);
- // helper fns you can override but shouldn't need to
- virtual UINT GetMatches(LPCTSTR pszText, CStringArray& arMatches,
- BOOL bFirstOnly=FALSE);
- virtual void OnFirstString();
- virtual BOOL OnNextString(CString& sNext);
- virtual BOOL OnMatchString(const CString& s, const CString& sMatch);
- virtual BOOL IgnoreCompletion(CString s);
- virtual void OnComplete(CWnd* pWnd, CString s);
- virtual void DoCompletion(CWnd* pWnd, CString s,
- const CStringArray& arMatches);
- public:
- CAutoComplete();
- ~CAutoComplete();
- void Init(CWnd* pWnd);
- CStringArray& GetStringList() { return m_arStrings; }
- };