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.

160 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1990-1998, Microsoft Corporation All rights reserved.
  3. Module Name:
  4. find.h
  5. Abstract:
  6. This module contains the header information for the Win32 find dialog.
  7. Revision History:
  8. --*/
  9. //
  10. // Include Files.
  11. //
  12. #include <help.h>
  13. //
  14. // Constant Declarations.
  15. //
  16. //
  17. // Length of "Close" string in chars.
  18. //
  19. #define CCHCLOSE 9
  20. //
  21. // Dialog Box PROPERTY slots defined.
  22. //
  23. // Note: If each app does indeed have a copy of the dll's global
  24. // variable space, then there is no reason to stick properties
  25. // onto the window like this.
  26. //
  27. #define FINDREPLACEPROP (LPCTSTR) 0xA000L
  28. //
  29. // Overload Dialog Type.
  30. //
  31. #define DLGT_FIND 0x0
  32. #define DLGT_REPLACE 0x1
  33. #define cbFindMax 1024
  34. //
  35. // Typedef Declarations.
  36. //
  37. typedef struct {
  38. UINT ApiType;
  39. UINT DlgType;
  40. LPFINDREPLACE pFR;
  41. } FINDREPLACEINFO;
  42. typedef FINDREPLACEINFO *PFINDREPLACEINFO;
  43. //
  44. // Global Variables.
  45. //
  46. static UINT wFRMessage;
  47. static UINT wHelpMessage;
  48. static TCHAR szClose [CCHCLOSE];
  49. LPFRHOOKPROC glpfnFindHook = 0;
  50. //
  51. // Context Help IDs.
  52. //
  53. const static DWORD aFindReplaceHelpIDs[] = // Context Help IDs
  54. {
  55. edt1, IDH_FIND_SEARCHTEXT,
  56. edt2, IDH_REPLACE_REPLACEWITH,
  57. chx1, IDH_FIND_WHOLE,
  58. chx2, IDH_FIND_CASE,
  59. IDOK, IDH_FIND_NEXT_BUTTON,
  60. psh1, IDH_REPLACE_REPLACE,
  61. psh2, IDH_REPLACE_REPLACE_ALL,
  62. pshHelp, IDH_HELP,
  63. grp1, IDH_FIND_DIRECTION,
  64. rad1, IDH_FIND_DIRECTION,
  65. rad2, IDH_FIND_DIRECTION,
  66. 0, 0
  67. };
  68. //
  69. // Function Prototypes.
  70. //
  71. HWND
  72. CreateFindReplaceDlg(
  73. LPFINDREPLACE pFR,
  74. UINT DlgType,
  75. UINT ApiType);
  76. BOOL
  77. SetupOK(
  78. LPFINDREPLACE pFR,
  79. UINT DlgType,
  80. UINT ApiType);
  81. HANDLE
  82. GetDlgTemplate(
  83. LPFINDREPLACE pFR,
  84. UINT DlgType,
  85. UINT ApiType);
  86. BOOL_PTR CALLBACK
  87. FindReplaceDlgProc(
  88. HWND hDlg,
  89. UINT wMsg,
  90. WPARAM wParam,
  91. LPARAM lParam);
  92. VOID
  93. EndDlgSession(
  94. HWND hDlg,
  95. LPFINDREPLACE pFR);
  96. VOID
  97. InitControlsWithFlags(
  98. HWND hDlg,
  99. LPFINDREPLACE pFR,
  100. UINT DlgType,
  101. UINT ApiType);
  102. VOID
  103. UpdateTextAndFlags(
  104. HWND hDlg,
  105. LPFINDREPLACE pFR,
  106. DWORD dwActionFlag,
  107. UINT DlgType,
  108. UINT ApiType);
  109. LRESULT
  110. NotifyUpdateTextAndFlags(
  111. LPFINDREPLACE pFR);