GME  13
AutoComboBox.h
Go to the documentation of this file.
00001 #if !defined(AFX_AUTOCOMBOBOX_H__688CB930_C9CC_40DA_A85B_8D7471C9DBEF__INCLUDED_)
00002 #define AFX_AUTOCOMBOBOX_H__688CB930_C9CC_40DA_A85B_8D7471C9DBEF__INCLUDED_
00003 
00004 #if _MSC_VER > 1000
00005 #pragma once
00006 #endif // _MSC_VER > 1000
00007 // AutoComboBox.h : header file
00008 //
00009 
00011 // CAutoComboBox window
00012 
00013 #include "StringArrayEx.h"
00014 #include "TreeCtrlEx.h"
00015 
00016 class CAutoComboBox : public CComboBox
00017 {
00018 
00019         // Two paralell array for the found items
00020         CStringArrayEx m_strResults;
00021         CArray<HTREEITEM,HTREEITEM> m_hResults;
00022         // Remembering the previous combo text 
00023         CString m_strPrevTxt;
00024 
00025 
00026         CTreeCtrlEx* m_pTreeCtrl;
00027 // Construction
00028 public:
00029         CAutoComboBox(CTreeCtrlEx*);
00030 
00031 // Attributes
00032 public:
00033 
00034 // Operations
00035 public:
00036 
00037 // Overrides
00038         // ClassWizard generated virtual function overrides
00039         //{{AFX_VIRTUAL(CAutoComboBox)
00040         //}}AFX_VIRTUAL
00041 
00042 // Implementation
00043 public:
00044         void SetSelection(HTREEITEM hItem);
00045         BOOL Filter(CString & strFilter);
00046         void Fill(CString&,BOOL bReload=TRUE);
00047         void OnEditKeyDown(int nVKeyCode);
00048         virtual ~CAutoComboBox();
00049 
00050         // Generated message map functions
00051 protected:
00052         void OnKeyEnter();
00053         //{{AFX_MSG(CAutoComboBox)
00054         afx_msg void OnEditChange();
00055         afx_msg void OnSelendOk();
00056         //}}AFX_MSG
00057 
00058         DECLARE_MESSAGE_MAP()
00059 };
00060 
00062 
00063 //{{AFX_INSERT_LOCATION}}
00064 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00065 
00066 #endif // !defined(AFX_AUTOCOMBOBOX_H__688CB930_C9CC_40DA_A85B_8D7471C9DBEF__INCLUDED_)