PageSearch.h
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:2k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. #if !defined(AFX_PAGESEARCH_H__FAC79060_211E_41F2_8F6E_1C04932B42BC__INCLUDED_)
  2. #define AFX_PAGESEARCH_H__FAC79060_211E_41F2_8F6E_1C04932B42BC__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // pagesearch.h : header file
  7. //
  8. #include "OptionsPage.h"
  9. #include <afxtempl.h>
  10. /////////////////////////////////////////////////////////////////////////////
  11. // CPageSearch dialog
  12. class CSearchDialog;
  13. class CComboBoxSearch;
  14. class CPageSearch : public COptionsPage
  15. {
  16. DECLARE_DYNCREATE(CPageSearch)
  17. // Construction
  18. public:
  19. static void UpdateComboBox(CComboBoxSearch* pCombo);
  20. void RefreshList();
  21. static void Save();
  22. static void Load();
  23. CPageSearch();
  24. ~CPageSearch();
  25. struct ENGINE
  26. {
  27. CString strTitle, strKeyword, strSearch;
  28. };
  29. typedef CArray<ENGINE, ENGINE&> CEngineArray;
  30. // Atributes
  31. static CEngineArray m_arrEngines;
  32. // Dialog Data
  33. //{{AFX_DATA(CPageSearch)
  34. enum { IDD = IDD_PAGE_SEARCH };
  35. CListCtrl m_wndSearch;
  36. //}}AFX_DATA
  37. // Overrides
  38. // ClassWizard generate virtual function overrides
  39. //{{AFX_VIRTUAL(CPageSearch)
  40. protected:
  41. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  42. //}}AFX_VIRTUAL
  43. // Implementation
  44. protected:
  45. // Generated message map functions
  46. //{{AFX_MSG(CPageSearch)
  47. virtual BOOL OnInitDialog();
  48. afx_msg void OnButtonAdd();
  49. afx_msg void OnButtonEdit();
  50. afx_msg void OnButtonRemove();
  51. afx_msg void OnDblclkListSearch(NMHDR* pNMHDR, LRESULT* pResult);
  52. //}}AFX_MSG
  53. DECLARE_MESSAGE_MAP()
  54. };
  55. /////////////////////////////////////////////////////////////////////////////
  56. // CSearchDialog dialog
  57. class CSearchDialog : public CDialog
  58. {
  59. // Construction
  60. public:
  61. CSearchDialog(CPageSearch::ENGINE& engine, CWnd* pParent = NULL);   // standard constructor
  62. CPageSearch::ENGINE m_engine;
  63. // Dialog Data
  64. //{{AFX_DATA(CSearchDialog)
  65. enum { IDD = IDD_DIALOG_SEARCH };
  66. //}}AFX_DATA
  67. // Overrides
  68. // ClassWizard generated virtual function overrides
  69. //{{AFX_VIRTUAL(CSearchDialog)
  70. protected:
  71. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  72. //}}AFX_VIRTUAL
  73. virtual void OnOK();
  74. // Implementation
  75. protected:
  76. //}}AFX_MSG
  77. DECLARE_MESSAGE_MAP()
  78. };
  79. //{{AFX_INSERT_LOCATION}}
  80. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  81. #endif // !defined(AFX_PAGESEARCH_H__FAC79060_211E_41F2_8F6E_1C04932B42BC__INCLUDED_)