Picker.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #if !defined(AFX_PICKERCLASS_H__1A8EC040_8874_11D2_9FE1_00104B791122__INCLUDED_)
  19. #define AFX_PICKERCLASS_H__1A8EC040_8874_11D2_9FE1_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. /////////////////////////////////////////////////////////////////////////////
  24. //
  25. // PickerClass
  26. //
  27. /////////////////////////////////////////////////////////////////////////////
  28. class PickerClass : public CStatic
  29. {
  30. // Construction
  31. public:
  32. PickerClass();
  33. // Attributes
  34. public:
  35. // Operations
  36. public:
  37. // Overrides
  38. // ClassWizard generated virtual function overrides
  39. //{{AFX_VIRTUAL(PickerClass)
  40. protected:
  41. virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
  42. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  43. //}}AFX_VIRTUAL
  44. // Implementation
  45. public:
  46. virtual ~PickerClass();
  47. // Generated message map functions
  48. protected:
  49. //{{AFX_MSG(PickerClass)
  50. afx_msg void OnSize(UINT nType, int cx, int cy);
  51. afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
  52. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  53. afx_msg void OnPaint();
  54. //}}AFX_MSG
  55. DECLARE_MESSAGE_MAP()
  56. public:
  57. //////////////////////////////////////////////////////////////////////////////////
  58. // Public methods
  59. //////////////////////////////////////////////////////////////////////////////////
  60. //
  61. // Stuff
  62. //
  63. virtual bool Create_Picker (DWORD style, const RECT &rect, CWnd *parent, UINT id);
  64. virtual void Initialize_Control (void);
  65. virtual void Set_Read_Only (bool readonly = true);
  66. //
  67. // Icon control
  68. //
  69. virtual void Set_Icon (HICON icon) { m_Icon = icon; }
  70. //
  71. // Overrideables
  72. //
  73. virtual void On_Pick (void) {}
  74. protected:
  75. //////////////////////////////////////////////////////////////////////////////////
  76. // Protected member data
  77. //////////////////////////////////////////////////////////////////////////////////
  78. HWND m_BrowseButton;
  79. HWND m_EditCtrl;
  80. HICON m_Icon;
  81. };
  82. //{{AFX_INSERT_LOCATION}}
  83. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  84. #endif // !defined(AFX_PICKERCLASS_H__1A8EC040_8874_11D2_9FE1_00104B791122__INCLUDED_)