diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /hammer/autoselcombo.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'hammer/autoselcombo.h')
| -rw-r--r-- | hammer/autoselcombo.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/hammer/autoselcombo.h b/hammer/autoselcombo.h new file mode 100644 index 0000000..17f1941 --- /dev/null +++ b/hammer/autoselcombo.h @@ -0,0 +1,47 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//=============================================================================// + +#ifndef AUTOSELCOMBO_H +#define AUTOSELCOMBO_H +#ifdef _WIN32 +#pragma once +#endif + + +class CAutoSelComboBox : public CComboBox +{ + typedef CComboBox BaseClass; + + public: + + CAutoSelComboBox(void); + + void SetTextColor(COLORREF dwColor); + void SubclassDlgItem(UINT nID, CWnd *pParent); + + protected: + + // Called by OnEditUpdate when the user types in the edit box + virtual void OnUpdateText(void); + + protected: + + void OnSetFocus(CWnd *pOldWnd); + afx_msg HBRUSH OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor); + afx_msg BOOL OnEditUpdate(void); + + DWORD m_dwTextColor; // RGB color of edit box text. + char m_szLastText[256]; // Last text typed by the user, for autocomplete code. + int m_nLastSel; // Index of last item we autoselected. + + bool m_bNotifyParent; // Whether we allow our parent to hook our notification messages. + // This is necessary because CControlBar-derived classes result in multiple + // message reflections unless we disable parent notification. + + DECLARE_MESSAGE_MAP() +}; + +#endif // AUTOSELCOMBO_H |