Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef AUTOSELCOMBO_H
  7. #define AUTOSELCOMBO_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. class CAutoSelComboBox : public CComboBox
  12. {
  13. typedef CComboBox BaseClass;
  14. public:
  15. CAutoSelComboBox(void);
  16. void SetTextColor(COLORREF dwColor);
  17. void SubclassDlgItem(UINT nID, CWnd *pParent);
  18. protected:
  19. // Called by OnEditUpdate when the user types in the edit box
  20. virtual void OnUpdateText(void);
  21. protected:
  22. void OnSetFocus(CWnd *pOldWnd);
  23. afx_msg HBRUSH OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor);
  24. afx_msg BOOL OnEditUpdate(void);
  25. DWORD m_dwTextColor; // RGB color of edit box text.
  26. char m_szLastText[256]; // Last text typed by the user, for autocomplete code.
  27. int m_nLastSel; // Index of last item we autoselected.
  28. bool m_bNotifyParent; // Whether we allow our parent to hook our notification messages.
  29. // This is necessary because CControlBar-derived classes result in multiple
  30. // message reflections unless we disable parent notification.
  31. DECLARE_MESSAGE_MAP()
  32. };
  33. #endif // AUTOSELCOMBO_H