FindDialog.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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_FINDDIALOG_H__C38C0FF8_E89B_11D3_A398_009027447394__INCLUDED_)
  19. #define AFX_FINDDIALOG_H__C38C0FF8_E89B_11D3_A398_009027447394__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // FindDialog.h : header file
  24. //
  25. // Defines.
  26. #define MAX_FIND_STRING_LENGTH 255
  27. /////////////////////////////////////////////////////////////////////////////
  28. // FindDialog dialog
  29. class FindDialog : public CDialog
  30. {
  31. // Construction
  32. public:
  33. FindDialog(CWnd* pParent = NULL); // standard constructor
  34. static const char *String()
  35. {
  36. return (_FindString);
  37. }
  38. static void Compare (const char *string)
  39. {
  40. _Found |= (strstr (string, _FindString) != NULL);
  41. }
  42. static bool Found()
  43. {
  44. return (_Found);
  45. }
  46. static void Found (bool found)
  47. {
  48. _Found = found;
  49. }
  50. // Dialog Data
  51. //{{AFX_DATA(FindDialog)
  52. enum { IDD = IDD_TOOLS_FIND };
  53. // NOTE: the ClassWizard will add data members here
  54. //}}AFX_DATA
  55. // Overrides
  56. // ClassWizard generated virtual function overrides
  57. //{{AFX_VIRTUAL(FindDialog)
  58. protected:
  59. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  60. //}}AFX_VIRTUAL
  61. // Implementation
  62. protected:
  63. // Generated message map functions
  64. //{{AFX_MSG(FindDialog)
  65. virtual BOOL OnInitDialog();
  66. afx_msg void OnChangeFindString();
  67. afx_msg void OnUpdateFindString();
  68. //}}AFX_MSG
  69. DECLARE_MESSAGE_MAP()
  70. private:
  71. static bool _Found;
  72. static char _FindString [MAX_FIND_STRING_LENGTH + 1];
  73. };
  74. //{{AFX_INSERT_LOCATION}}
  75. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  76. #endif // !defined(AFX_FINDDIALOG_H__C38C0FF8_E89B_11D3_A398_009027447394__INCLUDED_)