Source code of Windows XP (NT5)
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.

74 lines
1.7 KiB

  1. #if !defined(AFX_COUNTRYCOMBOBOX_H__8F522A56_3E30_11D2_9313_0060088FF80E__INCLUDED_)
  2. #define AFX_COUNTRYCOMBOBOX_H__8F522A56_3E30_11D2_9313_0060088FF80E__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // CountryComboBox.h : header file
  7. //
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CCountryComboBox window
  10. class CCountryComboBox;
  11. class CComboEdit : public CEdit
  12. {
  13. CCountryComboBox * m_pParent;
  14. public:
  15. BOOL SubclassDlgItem(UINT nID, CCountryComboBox * pParent);
  16. afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
  17. DECLARE_MESSAGE_MAP()
  18. };
  19. typedef struct _COUNTRY_DATA
  20. {
  21. TCHAR * code;
  22. TCHAR * name;
  23. } COUNTRY_DATA;
  24. class CCountryComboBox : public CComboBox
  25. {
  26. CComboEdit m_edit;
  27. CMapStringToString m_map_name_code;
  28. CString m_strInput;
  29. int m_Index;
  30. // Construction
  31. public:
  32. CCountryComboBox();
  33. // Attributes
  34. public:
  35. // Operations
  36. public:
  37. BOOL SubclassDlgItem(UINT nID, CWnd * pParent);
  38. BOOL Init();
  39. BOOL OnEditChar(UINT nChar);
  40. void SetSelectedCountry(CString& country_code);
  41. void GetSelectedCountry(CString& country_code);
  42. // Overrides
  43. // ClassWizard generated virtual function overrides
  44. //{{AFX_VIRTUAL(CCountryComboBox)
  45. public:
  46. //}}AFX_VIRTUAL
  47. // Implementation
  48. public:
  49. virtual ~CCountryComboBox();
  50. // Generated message map functions
  51. protected:
  52. //{{AFX_MSG(CCountryComboBox)
  53. //}}AFX_MSG
  54. DECLARE_MESSAGE_MAP()
  55. };
  56. /////////////////////////////////////////////////////////////////////////////
  57. //{{AFX_INSERT_LOCATION}}
  58. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  59. #endif // !defined(AFX_COUNTRYCOMBOBOX_H__8F522A56_3E30_11D2_9313_0060088FF80E__INCLUDED_)